To be clear MappedSelect is a 4.0 analog of the older NamedQuery, only with better API. So John's advice stands.
Andrus > On Dec 21, 2016, at 6:13 PM, John Huss <[email protected]> wrote: > > 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 <[email protected]> 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 >> >>
