-->
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: Updating one set of children only
PostPosted: Fri Aug 24, 2007 1:43 am 
Newbie

Joined: Wed Feb 07, 2007 7:55 pm
Posts: 18
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.x
Mapping documents:

Code between sessionFactory.openSession() and session.close():
merge(obj)

Name and version of the database you are using:
MySQL

I have a class with more than one collection data type children something like the followings:
Code:
class A {
   // ...
   
   private Set<B> bSet;
   private Set<C> cSet;
 
   // ...
}

Since this class is quite big, we don't fetch all its children set for one usage. When we only consider one set of its children, we only fetch an instance of this class and the set of children. If we need to update one set of children, bSet for example, only. How it can be done with in Hibernate? Shall we fetch all of its children sets so that the Hiberneate knows which children set is dirty and update it. Or I have to use native SQL to handle it?


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.