I'm a newbie in term of Hibernate, so I've got a question... :-)


If I'm modeling an Entity (which has relationships with other entities) and 
uses a FinderMethod with a search "like" criteria. The runtime behaviour of the 
finder method is as follow:

  - if the search returns 100 results

  - then Hibernate is going to execute 100 queries to retreive the 
relationships of each entity.



It'll better to do 2 queries:

  - query 1 --> do the search

  - query 2 --> return the relationships of all the entities by using a IN 
subquery which contains all the ID from the first query



Have I model incorrectly my entities or is it a problem of the Hibernate 
cartridge or is it a problem of Hibernate 2.1?

If it's an Hibernate issue then it is fix under the version 3?



Thx.

Ced.
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=1069#1069
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to