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.