Hi Lalith,
I think I found a solution for to_char(). Use the HQL function str(), lower(), upper().
It worked for me:
from Category where lower(str(id)) like '%8%'
And I corrected the setence 2 in my last post and it worked:
2) from Category where lower(id) like '%8%'
I didn't tested it for other data types like date, boolean, float, timestamp, blob and so on.
For the problem using convert() I read somewhere that you can use it:
cast(... as ...), where the second argument is the name of a Hibernate type, and extract(... from...) if ANSI cast() and extract() is supported by the underlying database
Please, don't forget to rate this post !
Good Luck !
Jocafi
|