Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate criteria with equals for date fields

Michael Sampson
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe someone knows something about this but if not maybe just typing my question out could help resolve this either way here it goes...
So I am working with Oracle database that has a date field that will have date down to hours, minutes, seconds, not just year, month, day. Now for my domain object I have this:
class Group {

private java.util.Date startDate;

OK .... never mind I figured it out. So the deal is even though I have it as type Date in the domain object, in the criterial statment I cannot do this:

I have to do this:

It turns out that really a time stamp. Not a date. That was about a day's worth of work gone.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic