How do I exactly write the following query using entityManager.
Select * from TABLE_NAME where column_name in ('A', 'B');
I tried with the setParametrList()
method. However, it says that this method is not available for type Query.
Query query = entityManager.createQuery(
"Select t from TableEntity t WHERE t.name =:bd AND t.staus in (:statuses)", TableEntity .class)
.setParameter("bd", bd)
.setParameterList("statuses", statuses);
Error: The method setParameterList(String, List<String>) is undefined for the type TypedQuery<TableEntity >
The same method seems to work fine while using session.createQuery
. Any suggestions on this.