i've been trying to solve a problem for the last 2 days but i couldn't.
what i want to do is having a method which returns the registers from the database that have the orderDate between two values. i use the query:
SELECT OBJECT(d) FROM Orders d WHERE (d.orderDate BETWEEN ?1 AND ?2) AND d.despatched = 0
no problem. i've fixed it.