cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Giaccone <tgiacc...@gmail.com>
Subject Re: AddPrefetch
Date Mon, 14 Oct 2013 12:47:46 GMT
In fact the promotion offer chain table is a table which contains keys for three other tables
and is used to link those three. A key in that table would have to be all three elements and
so we choose to not specify a key. 

Tony

> On Oct 13, 2013, at 9:25 PM, Aristedes Maniatis <ari@maniatis.org> wrote:
> 
>> On 14/10/13 12:05am, Tony Giaccone wrote:
>> 
>> With the prefetch in place as I singled stepped through the code, I could see Cayenne
making the three fetches when the call was made to performQuery.
>> 
>> This line, always returned null. 
>> 
>> Promotion promo = item.getToPromotion();
>> 
>> It wasn't till I added the join semantics that the prefetch worked and the relationships
where valid. My question is why?  I've never had to use join semantics to prefetch to work
and I wonder what it is about this configuration that requires them?
> 
> 
> I'd hazzard a guess and say that your one-to-one mapping of the OfferChain to Promotion
is related to your issue. Are you missing a primary key in OfferChain, instead relying on
the primary key from the joined Promotion?
> 
> 
> Ari
> 
> 
> 
> -- 
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message