21
Por ejemplo, tengo esta consulta¿Cómo establecer la lista de valores como parámetro en la consulta de hibernación?
select cat from Cat cat where cat.id in :ids
y quiero establecer los identificadores a la lista (1,2,3,4,5,6,17,19).
Este código no funciona
session.createQuery("select cat from Cat cat where cat.id in :ids")
.setParameter("ids", new Long[]{1,2,3,4,5})
Como resultado me gustaría tener consulta SQL como id in (1,2,3,4)
increíble, gracias – nihirus