| Thank you Vlad, problem is it's not the mapped collection to have 100k records, but the entity table itself. Think about a Order entity, with a @OneToMany products collection. Order table has +100k records, but each Order has no more than 10 products. Then, if I include products in the entity graph, it will use the hard-coded JOIN fetch style and no matter how I try to paginate with firstResult/maxResults Hibernate will try to select all +100k Order records since: firstResult/maxResults specified with collection fetch; applying in memory. Other problem is when in the entity graph there are two collection: with the hard-coded JOIN fetch style, Hibernate complains that _ org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags_. |