I tried to do something that does not seem to work in JPQL:
JPQL:
select c from Car c left join fetch c.owner where c.type in (?1) order by c.model
code:
public List<Car> findCarsFilterByTypes(CarType[] types) { return (List<Car>) this.entityManager.createNamedQuery("dealership.findCarsFilterByTypes") .setParameter(1, types).getResultList(); }
I was hoping that a simple way to use an array would work ... but it apparently doesn't ... I get a useless exception.
Does anyone know how I will need to get all the cars that are on some lists of car types?
source share