username
如果我有 2 个参数和,如何查询特定项目projectname
?特别是,以下查询有什么问题?
class Person {
private String name;
private List<Project> projects;
}
class Project {
private String projectname;
}
询问:
SELECT Project FROM Person p WHERE p.name := username AND p.projects.projectname =: projectname
结果:
illegal attempt to dereference collection [person0_.name.projects] with element property reference [projectname]