2 years ago
#72237
gene b.
Spring Data CRUD Method Name for: Child Object IN
I have a UserRoles (USER_ROLES_T)
domain object which contains a Lookup
child object which is an ID.
@Entity
@Table(name = "USER_ROLES_T")
public class UserRoles {
//...
private LookupT role;
}
@Entity
@Table(name = "LOOKUP_T") {
public class LookupT {
//...
private int id;
}
I need to run a Spring Data CRUD method (no annotations) whose name would find by role (LookupT) IN (List).
E.g.:
findUserRolesByRoleIdIn(List<Integer> roleIds);
findUserRolesByRoleIdIn(100,101);
But would this be correct? I'm not referencing a flat field called roleId
. I need to find by role.id in (..)
. So what's the correct Spring Data CRUD signature to denote the child object's IN?
spring
spring-data
0 Answers
Your Answer