cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: General queries
Date Wed, 08 Apr 2009 05:46:09 GMT
Cayenne 3.0 includes support for EJBQLQuery which seem like you what  
you need here:

We are following the JPA syntax per JSR-220 (

). At does support aggregates, separate columns, subqueries, etc.  
Anything not supported by the EJBQLQuery will indeed require a  
SQLTemplate, which is not as scary as it sounds.

Hope this helps.


On Apr 8, 2009, at 8:26 AM, Weddle, Anthony wrote:

> We're looking at moving from Hibernate to Cayenne but I'm having  
> trouble
> finding out how to perform queries that return arbitrary data, maybe
> they are sometimes called report queries. Something like Hibernate's  
> queries that can return arbitrary data (including aggregate  
> functions or
> simply a bunch of columns from different tables that may have formal  
> or
> informal relationships).
> I can't seem to find any examples of this. All of the query classes  
> seem
> to require a specific class (or some specific entity) and the
> SQLTemplateQuery doesn't take Expression qualifiers or interpret POJO
> property paths.
> I assume that there is a not too complicated way to perform arbitrary
> queries, without having to go to raw SQL. Is that true?
> Thanks,
> Tony
> NOTICE - This message and any attached files may contain information  
> that is confidential, legally privileged or proprietary.  It is  
> intended only for use by the intended recipient. If you are not the  
> intended recipient or the person responsible for delivering the  
> message to the intended recipient, be advised that you have received  
> this message in error. Any dissemination, copying, use or re- 
> transmission of this message or attachment, or the disclosure of any  
> information therein, is strictly forbidden. BlueScope Steel Limited  
> does not represent or guarantee that this message or attachment is  
> free of errors, virus or interference.
> If you have received this message in error please notify the sender  
> immediately and delete the message.  Any views expressed in this  
> email are not necessarily the views of BlueScope Steel Limited.

View raw message