我有一个对象列表的要求,我必须使用该对象进行联接,并且应该将其作为参数传递给函数。 例如:
Class Dept{
String deptId;
String deptName;
int order;
}
Class Person{
String personId;
String personName;
int deptId;
}
So I've a list of Dept object. List listOfDept;
Now I need to know if there's a way in JPA(JPQL) through which I can do something like this :
@Query( value = 'Select p from Person p where p.deptId = DeptObject.deptId (+) order by DeptObject.order')
List<Person> findPersonFromDeptListLeftOuterJoin( List<Dept> listOfDept )
例如Image will help understand example better, in case of confusion