i have the following constellation:
public final class ApplicationUser {
private final @Id
@Wither
long applicationUserId;
@NotNull
@Size(min = 4, max = 20)
private final
String login;
@NotNull
@Email
private final
String eMail;
@Wither
private Set<Privilege> privileges;
}
Now i want to query one ApplicationUser
by its login
which is done by a simple sql Query
.
My question now:
Is there any spring-data-jdbc related thing to jpa´s join fetch so that i can fetch the associated Set<Privilege> privileges
in one declared query?
Or do i have to fire another query like so:
- query
ApplicationUser
by its login - query
Privilege
by its foreign keyapplicationuser
Thank you