spring-data-jpa icon indicating copy to clipboard operation
spring-data-jpa copied to clipboard

Allow @EntityGraph to be specified at class level [DATAJPA-673]

Open spring-projects-issues opened this issue 10 years ago • 1 comments

Eric Sirianni opened DATAJPA-673 and commented

It would be nice if a default @EntityGraph for all queries in a repository class could be specified at the class level. The semantics would be that method-level @EntityGraph annotations would override the class-level default. Perhaps an @EntityGraph(null) could be specified at a method-level to disable entity graph for that query (if "unsetting" the default is needed).

Among other benefits, this would reduce the boilerplate needed to workaround quirks in the JPA implementations (Hibernate) with regards to join-fetching of associations (see DATAJPA-208 and DATAJPA-198)


Affects: 1.7.2 (Evans SR2)

2 votes, 3 watchers

spring-projects-issues avatar Feb 11 '15 07:02 spring-projects-issues