cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: AddPrefetch
Date Mon, 14 Oct 2013 01:25:50 GMT
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