As far as I can remember, @Select is used for the Default Fetch Graph of a given association. The Default Fetch Graph can be overridden at runtime using:
- JOIN FETCH in JPQL queries
- @FetchProfiles, which also support a {{FetchMode{{ via FetchOverride
- JPA Entity Graphs
The JPA Entity Graph implementation was done from the JPA spec perspective, therefore, not making use of the Hibernate-specific FetchMode. Steve Ebersole, what di you think of this request? Should we allow the JPA Entity Graph to take into consideration the @Fetch(SELECT) option? |