1

I am trying lazy fetch JPA entities like described in How to load lazy fetched items from Hibernate/JPA in my controller That post in the example uses two classes - Person and Role and Person entity has associated roles.

I need to fetch roles for each person, but I need to fetch only some persons not all the persons. So - can I use @Query and @EntityGraph on the the same method of repository?

Neil Stockton
  • 11,383
  • 3
  • 34
  • 29
TomR
  • 2,696
  • 6
  • 34
  • 87

0 Answers0