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: Saving an orphan collection of objects
PostPosted: Wed Jun 04, 2008 11:19 am 
Newbie

Joined: Wed Jun 04, 2008 10:51 am
Posts: 1
Location: England
Hi,

Having looked at NHibernate briefly its evident that to save an Entity you would call;

session.Save(Entity)

I would like to know how you can save multiple entities at the same time.These will most of the time be child entities, however sometimes they will be orphan.

Other persistence engines I have seen generate Entity and EntityCollection objects. With these you could do something like the following;

session.Save(EntityCollection)

This would automatically handle inserts/updates/deletes. Is there something similar in NHiberate that would help me do this?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 16, 2008 11:06 am 
Senior
Senior

Joined: Thu Jun 21, 2007 8:03 am
Posts: 127
Location: UK
Hi Devman,

I'm not aware of such a function in NHibernate. I think your best bet is a simple loop.

Regards,
Richard


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.