cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Fetching Specified "Raw Rows" with SelectQuery
Date Sun, 25 Apr 2010 08:56:48 GMT
We had this functionality prior to Cayenne 3.0. Now the recommended  
way to specify columns is to use EJBQLQuery instead of SelectQuery. It  
would return either a list of scalars or list of Object[], depending  
on a number of columns in the query. E.g.:

"select a.artistName from Artist a"

Andrus

On Apr 25, 2010, at 4:41 PM, Andrew Lindesay wrote:

> Hello;
>
> The "SelectQuery" has the method "setFetchingDataRows()" which I  
> understand to mean that the query will return a  
> List<org.apache.cayenne.DataRow>.
>
> I would also like to specify the attribute properties or similar  
> which I would like to be returned for the query –– is this possible  
> with Cayenne?
>
> For those who are also versed with EOF, I would like to do;
>
> 	...
> 	EOFetchSpecification fs = new EOFetc...
> 	fs.setFetchesRawRows(true);
> 	fs.setRawRowKeyPaths(new NSArray<String>(new String[] { ... }));
> 	...
>
> cheers.
>
> ___
> Andrew Lindesay
> www.silvereye.co.nz
>
>


Mime
View raw message