Hi, I'm trying to run the query below in postgres with em.createQuery();
Code:
String q = "select id from Calendar c " +
"where c.isActive = 1 and " +
"date_part('dow', '2017-09-19 13:23:23'::date) = c.frequencyValue)";
Query query = em.createQuery(q);
List results = query.getResultList();
The problem I have now is if I don't include
Code:
::date
, postgres will throw an exception.
Code:
Could not choose a best candidate function. You might need to add explicit type casts.
but If I include ::date, hibernate will complain.