class X {
Y y;
}
class Y {
Long id;
}
@NamedQuery(name = "someName", query = "from X where y.id in :ids")
I have public, table, entity and everything else on Entities, but I did not write them here.
TypedQuery<X> query = getEntityManager().createNamedQuery("someName", X.class);
query.setParameter("ids", someListOfLongs);
queryFinal.getResultList();
Parameter value [[Ljava.lang.Object;@90d0bf] was not matching type [java.lang.Long]
I tried with or without (), I changed the version of Hibernate-Core to 3.6.4 (from JBoss 6.0.0.Final), otherwise, if I wrote in :idswithout (), I got an error.
Please, help.
The IN always worked, the problem was that List<Long> wasn't actually List<Long> was List<Object[]>. Thanks
source
share