Not possible to add a where clause to a query that check if a tuple is in a tuple list :parameter.

Description

After some internet search without finding any answer, I think this functionality doesn't exist in any Hibernate version but can be really useful. The code below will fail with "java.sql.SQLSyntaxErrorException: ORA-00920: opérateur relationnel non valide" when executed on Oracle.
So, it doesn't seem possible to add a where clause to a query that check if a tuple is in a tuple list parameter.

monospaced text
String queryTest = "select customer from CustomerEntity customer where (customer.fistname, customer.lastname) in (airsList)";
List<Object[]> values = new ArrayList<>();
values.add(new Object[]
{"firstname1", "lastname1"}
);
values.add(new Object[]
{"firstname2", "lastname2"}
);
Query q = em.createQuery(queryTest);
q.setParameter("pairsList", values);
return q.getResultList();
monospaced text

Environment

None

Assignee

Unassigned

Reporter

Yves-Ma. Laine

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Critical
Configure