I am trying to query all the transactions happened from a list of dates.So I tried the below function:
public Collection<Transaction> getTransactionsByDates(short status,List<Date> dates){
Query query = em.createQuery(" SELECT a FROM Transaction a where a.Status=:status and a.dates in :transactionDate");
query.setParameter("status", status);
query.setParameter("dates", dates);
return (Collection<Transaction>) query.getResultList();
}
But this throws the error of
org.hibernate.QueryException: could not resolve property: dates
Am I querying in JPA properly?
Any help is appreciated!
I think there is typo