Hibernate version:3.30GA
It appears that HQL expression support is more expansive than exression support under the Criteria API. Are there Criteria Query class functions that support any of the following, and if so where?:
1. stardard math operators such as: * / + -
2. EJB-QL 3.0: substring(), trim(), lower(), upper(), length(),
locate(), abs(), sqrt(), bit_length(), mod()
3. database-supported SQL scalar function like sign(), trunc(), rtrim(), sin()
I can't seem to find any Restrictions or Projections that support these constructs. IOW, I'd like to do the following SQL with the Criteria API without resorting to direct SQL usage, such as Restrictions.sqlRestriction(). For example, if I just want to add two fields together in the where clause (f1 +f2) > 100, do I have to use Restrictions.sqlRestriction() or is there an some kind of alternative alternative?
|