Sql JPQL IN子句-名称为null的列

Sql JPQL IN子句-名称为null的列,sql,spring,jpa,eclipselink,jpql,Sql,Spring,Jpa,Eclipselink,Jpql,我正在尝试使用IN子句创建一个查询,该子句将一个表映射到另一个具有复合键的表。作为参考,第一个表将复合键(三列)映射到OtherTable(包含OtherTableId对象) 例如: select t1 from Table t1 where t1.otherTable in :listOfOtherTables; ... List<OtherTable> listOfOtherTables= Arrays.asList(new OtherTable(...), ...); que

我正在尝试使用IN子句创建一个查询,该子句将一个表映射到另一个具有复合键的表。作为参考,第一个表将复合键(三列)映射到
OtherTable
(包含
OtherTableId
对象)

例如:

select t1
from Table t1
where t1.otherTable in :listOfOtherTables;

...
List<OtherTable> listOfOtherTables= Arrays.asList(new OtherTable(...), ...);
query.setParameter("listOfOtherTables", listOfOtherTables);
其中应为列名,显示为空

有人能帮我吗

PS:我也试过:

select t1
from Table t1
where t1.otherTable in (:otherTableObject1, :otherTableObject2, otherTableObject3);

也不起作用。

并非所有数据库都支持这种类型的语句,我认为EclipseLink中也不支持这种语句。看到这里的答案了吗?我相信我必须进行本地查询才能完成我想要的。我认为JPA不支持它很奇怪,即使不是所有的数据库都支持这种类型的语句。抛出错误而不是在列名中输入null会很好。答案显示有人试图添加对EclipseLink的支持-您可以尝试一下,并请求正式添加它。
select t1
from Table t1
where (NULL, NULL NULL) IN (("value1", "value2", "value3"), ("value1", "value2", "value3), ...);
select t1
from Table t1
where t1.otherTable in (:otherTableObject1, :otherTableObject2, otherTableObject3);