Hibernate Team |
 |
Joined: Tue Aug 26, 2003 7:19 pm Posts: 2364 Location: Brisbane, Australia
|
The HQL is translated to SQL so in general if it makes sense in SQL you might just be able to do it in HQL (but with less complications). In this case, if you db accepts the translated syntax then yes. Most dbs that I know would not accept the syntax. You may need to convert tyhe string representation to a date using a db function (such as to_date() in Oracle). Now I do suggest you pass parameters where in this case it would be a java date object.
|
|