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.  [ 2 posts ] 
Author Message
 Post subject: Inverse collection
PostPosted: Tue Sep 05, 2006 11:23 am 
Beginner
Beginner

Joined: Thu Jul 06, 2006 4:44 am
Posts: 31
Hi.

Is it possible to save the collection content simultaniously by saving the object containing the collection?
Like:
Parent p = new Parent();
Child c = new Child(p);
p.Children.Add(c);
session.Save(p);

Can the nhibernate be mapped to save the list too and therefore all children in the list (and their children and so on...)?

tnx

markov


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 06, 2006 4:29 am 
Senior
Senior

Joined: Wed Jun 15, 2005 4:17 am
Posts: 156
Of course. Just add the cascade attribute to the collection mapping. Check the docs for details.

Radu


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.