Hello,
Hibernate 4.3.6, JPA. As I understand it, when I create a query that fetch sub collection, Hibernate needs to fetch all the entity even if I put a maxSize. I understand it is necessary as the number of row is multiplied by the element in the collection and thus setting the limit to maxSize will not fetch enough entities.
So the questions are : - In configuration, is it possible to tell hibernate to fetch first the ids of the elements (so it can use the limit), then fetch the entity - In configuration, Is it possible to tell hibernate to fetch 10 row at a time and stop when it gets enough - Is there any other way i don't know
The problem is I have a lot of entities, so it degrade the performance !
Thank you very much, Jean
|