Hi,
I am using Hibernate 3.0 with an oracle database. Basically, I need to call the in built oracle "replace" function from my code.
So I used the session.createSQLQuery() and ran it as a native query and not as an HQL. However I find this approach rather cumbersome and prefer using HQL as its much cleaner.
I looked up the hibernate documentation and found the following link:
http://www.hibernate.org/118.html#A26
As per this link, hibernate can be used to call SQL functions by "Subclass your Dialect, and call registerFunction() from the constructor".
Would doing the above enable me to call built in oracle functions from an HQL? Also, does anyone have any code samples for sub-classing the oracle dialect and registering a function?
Thanks in advance!