cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes <jotpe....@gmail.com>
Subject Re: Unexpected null value when prefetching with Cayenne.objectForQuery
Date Sat, 13 Dec 2014 08:52:54 GMT
No, I didn't read this, only the 3.1 documentation.
Of course my example is very simple. In that case, your are right,
SelectQuery is a better choice.
I found this issue, while doing a select-mix between persistent object
and some aggregate values, and I wanted to eleminate the lazy loading.

Thanks for your link! Johannes

Am 03.12.2014 um 23:23 schrieb Aristedes Maniatis:
> Did you see the documentation here: https://cayenne.apache.org/docs/3.0/advanced-sqltemplate.html
> 
> At any rate, I suggest that you don't use SQLTemplate unless you really need to. Instead,
use a regular SelectQuery where you don't need to craft complex SQL. This will keep your code
independent of database specifics.
> 
> Ari
> 
> 
> On 3/12/2014 10:25am, Johannes wrote:
>> Hello
>>
>> I had a problem when query for a entity with Cayenne.objectForQuery in
>> the particulare case of receiving null values by addPrefetch on
>> Many-to-many fields.
>>
>> Also postet here:
>>
>> https://issues.apache.org/jira/browse/CAY-1975
>>
>> Johannes
>>
> 


Mime
View raw message