Hello,

just now it is possible to add @EntityGraph as an annotation to @Query in
Repository. It has one limitation - it can't be changed
in the runtime according requirements of calling side. as I know the same
limitation is in Spring, but why not pass the EntityGraph
as an argument of Query? e.g.:

@Query("Select u from User where userName=?1")
public User getUserByName(@Param name, @ParamEntityGraph Map entityGraph);

it could be even better, if the dynamic entity graph is created using
metadata.

does it make a sense?

Vladimir Dvorak

Reply via email to