Hibernate version: 2.1.8
Hi all,
I have a small problem. I'm generating an Query string which contains the following:
Code:
String queryString = "from News n where n.status = :status AND :date between n.publicationDate AND n.expirationDate";
As you can see I'm using named parameters, where :date = new Date() we can discard :status in this case.
I'm using oracle 9.2 database in the background to retrieve the data. It seems that every database has its own way of dealing with the "between" actions. But that aside...
When I execute the sql query directly in oracle, I get different results (:date is replaced by sysdate). If the expirationDate is :date, the records are excluded in oracle, but included in hibernate Query!?
What's going wrong/different?