| The JPA spec also does not say which databases should be supported just like it doesn't say which functions must be avilable. This is probably an oversight as the dialects try to define all functions available but apparently the random function is not defined for your particular dialect. The problem with functions is that hibernate can't possibly know all functions available in a DBMS and what kind of data types they return. Since a return type is necessary to be able to actually use such a function as select item, you have to register it. If you try to select a non-registered function with EclipseLink, OpenJPA, Datanucleus or any other JPA provider, you will have the same issue. |