Re: flattened relationship updating

From: Michael Gentry (blacknex..mail.com)
Date: Fri Nov 17 2006 - 08:45:16 EST

  • Next message: Borut Bolčina: "[OT] Visual Paradigm"

    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 : Fri Nov 17 2006 - 08:45:43 EST