I am using spring data jpa to interact with a database, however I've come across a problem: I can't define the same method multiple times with different named entities.
Consider:
class Repository {
@EntityGraph(value = UserEo.FULL, type = EntityGraph.EntityGraphType.LOAD)
public Optional<UserEo> findUserEoByEmail/*Full*/(String email);
@EntityGraph(value = UserEo.BRIEF, type = EntityGraph.EntityGraphType.LOAD)
public Optional<UserEo> findUserEoByEmail/*Brief*/(String email);
}
I'd like to have separate methods with different named graphs, but adding additional information to the name of the methods breaks spring. How can this be solved?