-->
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: Can Hibernate satisfy this particular user requirement?
PostPosted: Thu Dec 04, 2003 12:14 pm 
Newbie

Joined: Thu Dec 04, 2003 11:59 am
Posts: 11
An entity class has many to many relationships to other entities. Lazy initialization is required for performance consideration. However, the entity needs to know if it contains other entities to set "isValid" status, i.e, it must contain at least one instance of each type of associated entities to be classified as valid.
While using lazy initializtion, how can this entity object (Contract object for example) knows if it has all other entities being added?
Does hibernate provides some sort of prechecking mechanism?

Thanks
George


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2003 1:43 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I guess that many-to-many lazy="false" and other side of the many object having a proxy will do what you want.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2003 1:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Sounds like a perfect case for a collection filter


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.