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
  • 10,922
  • 3
  • 30
  • 28
TomR
  • 2,357
  • 5
  • 30
  • 61

0 Answers0