java - JPQL test if value is in an array -
I was trying to do something that apparently does not work in JPQL:
JPQL:
c Select from right to fetch c.owner where c.model
code
Public listing & lt; Cars & gt; FindCarsFilterByTypes (car type [] type) {return (list & lt; car & gt;) this.entityManager.createNamedQuery ("dealership.findCarsFilterByTypes") .setParameter (1, type) .getResultList (); }
I was hoping an easy way to use the array would work ... but this is not apparently ... I'm getting a worthless exception.
Does anyone know that I need to know about all types of car cars?
Okay I came to know that if I use the list instead of Cartip [], then the above code works fine. :)
Comments
Post a Comment