Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 64437 invoked from network); 11 Jun 2009 17:09:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jun 2009 17:09:18 -0000 Received: (qmail 18503 invoked by uid 500); 11 Jun 2009 17:09:29 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 18471 invoked by uid 500); 11 Jun 2009 17:09:29 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 18461 invoked by uid 99); 11 Jun 2009 17:09:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 17:09:29 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.149.74] (HELO na3sys009aob105.obsmtp.com) (74.125.149.74) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 11 Jun 2009 17:09:19 +0000 Received: from source ([209.85.219.226]) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKSjE6KKCuoU9Dv7EOInt+JwPHEKQgCS3G@postini.com; Thu, 11 Jun 2009 10:08:58 PDT Received: by ewy26 with SMTP id 26so2143702ewy.1 for ; Thu, 11 Jun 2009 10:08:55 -0700 (PDT) Received: by 10.210.131.6 with SMTP id e6mr8956932ebd.81.1244740135566; Thu, 11 Jun 2009 10:08:55 -0700 (PDT) Received: from ?200.190.12.96? ([212.51.168.10]) by mx.google.com with ESMTPS id 28sm447074eyg.44.2009.06.11.10.08.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Jun 2009 10:08:55 -0700 (PDT) Message-ID: <4A313A25.3060509@smausa.com> Date: Thu, 11 Jun 2009 19:08:53 +0200 From: "lmarchal@smausa.com" User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: user@cayenne.apache.org Subject: Relationships refresh possible BUG Content-Type: multipart/alternative; boundary="------------070909000308070901070800" X-Virus-Checked: Checked by ClamAV on apache.org --------------070909000308070901070800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 : PREFETCH LIMITATION: 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. --------------070909000308070901070800--