-->
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: query algorithm
PostPosted: Fri Jun 10, 2005 10:44 am 
Newbie

Joined: Fri Jun 10, 2005 10:27 am
Posts: 6
I'm using Hibernate with AndroMDA (http://www.andromda.org) which uses version 2.1.8.
The generate code uses the following to do a search query:
- net.sf.hibernate.Criteria
- net.sf.hibernate.expression.Expression.ilike
The "criteria.list()" returns a list of my entity, that's fine...

The problem is my entity has many relationships to other entities, so Hibernate create a unique relationship query to create the depend entities, that's fine...

But if my criteria search returns 100 results, then hibernate will execute 100 queries to populate each entity relationship... why not using a single query with a "IN" subquery which contains the IDs from the query search?

Is it something normal for the Hibernate architecture or is it a feature under 2.1.8? maybe fix under Hibernate v3?

Any light will be nice... :-)
Thx.
Ced.


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.