When a ` {{ @OneToMany(fetch = FetchType.LAZY) List<Bean> beans ` }} is included with an ` {{ EntityGraph ` }} , it is loaded with the owner entity with a JOIN. Is this configurable? I tried adding ` {{ @Fetch(FetchMode.SELECT) ` }} but it gets ignored. Since I need to skip/limit using ` {{ firstResult() ` }} / ` {{ maxResults() ` }} , using EntityGraphs I get ` {quote} firstResult/maxResults specified with collection fetch; applying in memory ` !{quote} and having huge result set (over 100000 records, without skip/limit) the query takes minutes. Using ` {{ FetchType.EAGER ` }} the collection is fetched with a second query, without JOIN.
Is the JOIN fetching hardcoded when using ` {{ EntityGraph ` }} s? Or is it configurable? |
|