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: Some basic questions
PostPosted: Fri Jul 20, 2007 4:07 pm 
Beginner
Beginner

Joined: Fri Jul 07, 2006 12:08 pm
Posts: 37
I have a following scenario--I have an advertiser object which has a collection of campaign objects.And,each campaign has collection of countries.
I create a new advertiser object,add 2 campaigns with countries to it.Now,i call save on advertiser object.Will nhibernate send only one sql statement to save all objects??Also,when i load parent object,all child object too get loaded--again with only one sql statement??


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 20, 2007 5:21 pm 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
When you save the advertiser object, NHibernate would not automatically save the campaign object; unless some form of cascading is specified. Please read the documentation; specifically here:
http://www.hibernate.org/hib_docs/nhibe ... tiesvalues

NHibernate may or may not load your child objects depending on your mapping file. Please read the documentation; specifically here:
http://www.hibernate.org/hib_docs/nhibe ... e-fetching

_________________
Karl Chu


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 21, 2007 2:17 am 
Beginner
Beginner

Joined: Fri Jul 07, 2006 12:08 pm
Posts: 37
thanks for the links,exactly what i needed.In our company,we are planning to use nettiers,which it seems does not give many features nhibernate gives


Top
 Profile  
 
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.