openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Is this possible with CriteriaBuilder method
Date Wed, 20 Apr 2011 08:30:20 GMT
  > Can I convert this native MySQL query using purely the CriteriaBuilder
  Yes, you can. 

  Your question points to an important feature of Criteria query that is
distinct from string-based JPQL query. Criteria query API makes this
distinction via CriteriaBuilder.function() method -- that will allow you to
use database functions in your query.

  Similar expression is not possible to express with JPQL query that use a
fixed grammar.

  See usage of CriteriaBuilder.function() method.
  Or refer to this article [1] which has few examples of this method in its
'Advanced Features' section.


View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message