I haven't used MappedQuery, which may be a better solution.  But here is
the old-school way to do it.
http://cayenne.apache.org/docs/3.0/namedquery.html

You don't have to fetch DataRows, but be aware that you can only
materialize one type of Entity at a time.  And for performance you should
be sure to fetch ALL the columns of that entity - both of which it looks
like you are already doing.

John


On Wed, Dec 21, 2016 at 8:47 AM Kumar <kumar9885035...@gmail.com> wrote:

> I know setting the below property will solve the problem but i don't want
> DataRows to be return instead i want my persistent entity type.
>
> <property name="cayenne.GenericSelectQuery.fetchingDataRows" value="true"/>
>
> Thanks!
> Kumar
> ​
>

Reply via email to