-->
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.  [ 3 posts ] 
Author Message
 Post subject: Changes to a child object aren't updated
PostPosted: Tue Aug 09, 2005 12:03 pm 
I create a transient parent and then add a transient child to a persistant collection in the parent. I then call SaveOrUpdate on the parent and then make a change to the child object in the collection. The changes to the child aren't picked up once I do a flush...why?

Thanks in advance.


Top
  
 
 Post subject:
PostPosted: Wed Aug 10, 2005 10:41 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Make sure that you enable cascading...
Read:
7.7.2. Persistence by Reachability
8.3. Cascades

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 10, 2005 7:05 pm 
I believe the cascades are enabled correctly. And if I add children to the collection after I save the parent everything works fine...it's just the children that are added to the collection after the save but before the flush that are the issue.


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

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.