-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: create new objects instead of update existing ones problem
PostPosted: Wed Dec 22, 2004 11:23 am 
Newbie

Joined: Wed Dec 22, 2004 11:12 am
Posts: 1
I have a one-to-many list relationship. Sometime I want to duplicate the containing object.
I change the containing object key property and insert it. The new object is really created, but when cascaded to the contained list - Hibernate finds existing rows and it updates them. I want him to insert new rows and refer them to the newly created parent.
I tried to use "identity" as generator for child pk, but this didn't help, he still found the existing child and updated it.
Is there a way to force INSERT for the cascaded collection in case of an INSERT on the parent?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.