If you are interested to invoke database specific functions in query via JPA, one compliant means is to use Criteria Query. Via Criteria query interface, you can build a function of any name which may take zero or more arguments.
The interface and strict type structure of the API is somewhat intimidating than a pure and simple JPQL query string -- but it will makes some queries possible that are not expressible in JPQL. Here is an old article on Criteria Query on IBM developerworks [1] with an example of function() near the end. Regards -- [1] http://www.ibm.com/developerworks/library/j-typesafejpa/ ----- Pinaki Poddar Chair, Apache OpenJPA Project -- View this message in context: http://openjpa.208410.n2.nabble.com/JPQL-and-DB2-native-code-tp7586405p7587022.html Sent from the OpenJPA Users mailing list archive at Nabble.com.