Hi, I'm a bit stumped on finding an HQL equivalent for an existing SQL query that I'm converting for use in my persistence layer. I'm hoping for some advice.
The query contains something like
Code:
GROUP BY ...., CONVERT(nvarchar, entity.timestamp, 103)
which will actually group the result by entity.timestamp but as a date (dd/mm/yyyy) instead of the timestamp.
What is the best way to achieve this in Hibernate? Can this be done directly via HQL? Or should I do it via mapping by creating a UserType to hold only the date values and drop the time values?
Any help appreciated. Thanks.