Here is the minimal version of the code that took me a long time to understand why it does not work:
Query q = session.createQuery(queryString); q.setTimestamp(0, new java.util.Date());
Error:
Unset positional parameter at position: 0
When I replaced setTimestamp() with setParameter() :
Query q = session.createQuery(queryString); q.setParameter(0, new java.util.Date());
And it worked, but I canβt understand why. I am using hibernate 3.2.1.
EDIT:. Where did the publication with the other proposal come from? It was!
source share