cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Relationships refresh possible BUG
Date Wed, 17 Jun 2009 12:16:57 GMT
Hmm... wonder if the PREFETCH LIMITATION warning is only applicable to  
the default disjoint prefetches in 3.0. I have a feeling this type of  
prefetching should work with joint prefetches since the day when we  
started using OUTER JOINs for them. Could you give it a try?


On Jun 11, 2009, at 8:08 PM, wrote:

> Hello all !
>   I have currently a big problem refreshing my relationships with  
> cayenne 3.0M6 (tested with M5 too).
> I have a table JOB with some extended/dynamic properties and another  
> related JOB_AUX table (kinda key/value pair table). So there is a to- 
> many relationship between JOB->JOB_AUX with the flag "To Dep PK" set.
> In my JOB editor I display all the extended properties (JOB_AUX),  
> and I used to use the JOB.addPrefetch(related_JOB_AUX) to ensure  
> that the JOB and it's relationships are fresh each time I fetch a  
> job in the editor. I had a problem one day with :
> To-many relationships should not be prefetched if a query qualifier  
> can
> potentially reduce a number of related objects, resulting in incorrect
> relationship list.
> So I removed the prefetch and tried another way : In my editor I  
> need fresh data so I used RefreshQuery(JOB) each time a job is  
> selected to be sure that the related JOB_AUX will be fresh, but it  
> does not work.
> The funny thing is that :
> - RefreshQuery(JOB) does not see when a value _change_ in the  
> JOB_AUX table, but works when a value is _added_ or _removed._
> - I tried with RelationshipQuery(JOB, related_JOB_AUX, true) but it  
> only works when a value is _changed_ in the JOB_AUX table it does  
> not when a value is _added_ or _removed._
> So I can make my editor work when I use a combination of these two  
> queries on the JOB to have fresh data.
> Is this a bug ? do you have a Cayenne test case with an embedded  
> database that I can use to reproduce this case ?
> Thanks.
> Laurent Marchal.

View raw message