1
我有一个不同的id和他们的名字列表。每id[0]
我们有name[0]
需要匹配。如何在查询中使用HQL检查对是否存在?
- 列表ID的,名称
l{1,2,3,4};
- 名单,
n{a,b,c,d};
现在假设,如果我想要得到上述两种组合的精确匹配,是否有在HQL任何方式得到的结果?
我期待找到像查询替换:
select any_column
from table_name
where (id[0]=1 and name[0]=a) or (id[1]=2 and name[1]=b and so on...);
的HQL语句应该有如下的内容:
select any_column
from table_name
where (id,name) IN {(id[0],name[0]), (id[1], name[1]),...};
有什么建议?