It is possible to register other SQL functions with Hibernate and use them with HQL. As mentioned in
http://docs.jboss.org/hibernate/stable/ ... -functions this is an area that needs improvement. The usual way to solve this is to subclass an existing Dialect implementation and add definitions for your extra functions there. It is not very difficult but is a bit messy if you need to support multiple databases.
Another approach (that I prefer) is to register the function using the Configuration.addSqlFunction() method.