You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by vladimir dvorak <la...@gmail.com> on 2020/01/09 13:57:05 UTC

Dynamic @EntityGraph

  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