Reputation: 3
public List<Object[]> Medicine(java.util.Date asd){
String hql = "select u.date, from EsencijalnaLista where u.date > :s";
Query query = HibernateUtil.getSession().createQuery(hql);
query.setParameter("s", asd);
return query.list();
}
This is a query and I want to compare 2 dates. One is selected and it is "asd". The second is in a database and it is compared.
Upvotes: 0
Views: 955
Reputation: 1503429
It looks like your HQL is just missing anything saying what u
is. Try:
String hql = "select u.date from EsencijalnaLista as u where u.date > :s";
Upvotes: 1