Re: flattened relationship updating

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sat Nov 18 2006 - 15:54:21 EST

  • Next message: Malcolm Edgar: "Click Framework 1.1 is now available"

    Yeah, you either flatten a relationship or you don't. A mix of
    overlapping relationships would require manual maintenance.

    Andrus

    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 Gallery.java, try writing a getPaintings()
    > method.
    >
    > /dev/mrg
    >
    >
    > On 11/16/06, Marcin Skladaniec <marci..sh.com.au> 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
    >>
    >



    This archive was generated by hypermail 2.0.0 : Sat Nov 18 2006 - 19:54:49 EST