cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: flattened relationship updating
Date Sat, 18 Nov 2006 20:54:21 GMT
Yeah, you either flatten a relationship or you don't. A mix of  
overlapping relationships would require manual maintenance.


On Nov 17, 2006, at 8:45 AM, Michael Gentry wrote:

> 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, 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

View raw message