这是问题
public class Company
{
private Map<Location, Manager> locationManagerMap;
}
一个地点只有一个经理。经理可以与许多地点相关联。
public class Assignment
{
private Location location;
private Manager
}
现在假设我想通过使用子查询的hql查询来检索公司的所有分配列表,如下所示。
String query = "select from Assignment as assignment where (assignment.location, assignment.manager) in (select locationManager._____________ from Company as company inner join company.locationManagerMap as locationManager where company.id=?) "
在上面的查询子查询中,公司内部与locationManagerMap连接。我想访问此映射的键和值以执行多列条件检查。请在查询中建议空白语法应该是什么?
答案 0 :(得分:1)
它应该是这样的:
... index(locationManager), locationManager ...