I have an application that uses a combination of Hibernate (annotations) / MySQL for ORM. In this application, I got an object with a Date field. I am looking for a way to select this date within a time range (therefore hh:mm:sswithout a date part).
MySQL has a function TIME(expression)that can extract some of the time and use it in the where clause, but apparently it is not available in Hibernate without switching to its own queries. Is there an option in hibernate to do this, or should I look at the results in java and do a comparison there? Will it be much slower than the MySQL solution, because in any case it will not use indexes?
Linor source
share