| Author |
Hibernate fetching a list
|
Brian Mulholland
Ranch Hand
Joined: Mar 12, 2009
Posts: 54
|
|
|
So I have a query that returns N entities, each with multiple layers of subdetail. Is there a way i can get Hibernate to build a join so it can populate the object hierarchy in each row from a single statement? Because today, according to the show_sql attribute being on, I can see that it is making a query for each detail element. That isn't going to scale nicely over some features.
|
 |
Hebert Coelho
Ranch Hand
Joined: Jul 14, 2010
Posts: 754
|
|
You can use the join fetch in the query.
Check here for more details: http://uaihebert.com/?p=1274
|
[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
|
 |
 |
|
|
subject: Hibernate fetching a list
|
|
|