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

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -