Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 18507 invoked from network); 17 Nov 2006 13:45:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Nov 2006 13:45:41 -0000 Received: (qmail 55207 invoked by uid 500); 17 Nov 2006 13:45:50 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 55189 invoked by uid 500); 17 Nov 2006 13:45:50 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 55174 invoked by uid 99); 17 Nov 2006 13:45:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Nov 2006 05:45:50 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of blacknext@gmail.com designates 64.233.162.201 as permitted sender) Received: from [64.233.162.201] (HELO nz-out-0102.google.com) (64.233.162.201) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Nov 2006 05:45:37 -0800 Received: by nz-out-0102.google.com with SMTP id k1so513297nzf for ; Fri, 17 Nov 2006 05:45:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=a6C3SL+DiGr1TVvfc7ikqGl1wnbovF6TqreyPOjPRtJxkf1T7gnjk+QLYlyIeygQZ/dWBsLTVbk/2i3KJ2AmxMpYunRbIwdl3iQZ2D+68fWYEdPGTaYX9osVKbtuXysIrTvxGKVn07jO7o2v3s5hee/1WfxGPk4jg5zMDm0CuQ4= Received: by 10.35.40.10 with SMTP id s10mr3186836pyj.1163771116511; Fri, 17 Nov 2006 05:45:16 -0800 (PST) Received: by 10.35.135.3 with HTTP; Fri, 17 Nov 2006 05:45:16 -0800 (PST) Message-ID: Date: Fri, 17 Nov 2006 08:45:16 -0500 From: "Michael Gentry" To: cayenne-user@incubator.apache.org Subject: Re: flattened relationship updating In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org I've not flattened relationships in Cayenne yet, but this could be a bug/glitch (or a design choice). I went looking and saw this note in the docs: Most of flattened relationships are treated as read-only by Cayenne. I just tried creating one in my test model, too, and the modeler shows it as read-only, so this really might be a design choice. I remember EOF having a similar problem (not sure if the newest EOF still does). What we would do in EOF to work around the issue is to write cover method code ourselves to manually flatten the relationships. This seemed to work pretty well and probably would in Cayenne, too. In your Gallery.java, try writing a getPaintings() method. /dev/mrg On 11/16/06, Marcin Skladaniec wrote: > Hello > > I have a schema which goes something like this: > > Gallery (one)->(many) Artist (one)-> (many) Paintings > > I access the Paintings very often from the Gallery, and to make my > life easier I have flattened the relationship : > Gallery (one) -> (many) Paintings > > Now when the relationships are not changing everything is ok, but > when I alter the Artist -> Paintings relationship Gallery -> Painting > does not notice it, and still displays the old list. Is it my fault, > and I should not do flattening like this, should I do some kind of > refresh, or is it a minor bug in cayenne ? > > Regards > Marcin >