I'm having a little bit of trouble figuring out why while querying records by a date isn't working correctly for me.
I'm using Hibernate 3.0.5 and mysql 4.0.x.
I have a method where I pass a date and internally it queries for between the date passed in and one day prior.
In use, I would have passed this method something like this:
The query that Hibernate generates looks like this:
...which is great, that's exactly what I want....however it doesn't pull any data...the list comes up empty.
When I step through the debugger and watch the values...I can see that the date range is clearly correct when it is passed into the Critera query...and if I do this manually against the database:
...I pull up data just as I would have expected Hibernate to do.
What am I doing wrong?
How can I make this work correctly w/o destroying database portability w/ Hibernate? I'm quite new to Hibernate and still fairly new to
Java and don't understand all the semantics w/ the Date type yet.