Linking two unregistered CayenneDataObjects

From: Kevin Menard (kmenar..ervprise.com)
Date: Thu Sep 08 2005 - 22:38:30 EDT

  • Next message: Gili: "SelectQuery.queryWithParameters(ignoreMismatch)"

    Okay, I think this has been on the radar for a while. For me, it's
    the single-most annoying thing when working with Cayenne. I'm sure
    I'm not the only one that feels this way. So, I'm willing to step up
    and help out with this, but I'm going to need some guidance.

    For those that don't know what I'm talking about, the basic issue is
    that that if you try to associate two unregistered CayenneDataObjects
    with each other, Cayenne will throw an exception. Andrus has done
    some nice work in 1.2 whereby now if at least one is registered with
    a DC, then the other will be auto-registered. What I'd like to see
    is a way of delaying registration. So, two unregistered instances
    can be associated with one another, then when one gets registered it
    cascades down.

    There are a lot of reasons why this would be useful. Composition is
    an immediate one that comes to mind (the construct of one CDO cannot
    create and link another CDO). Another is that some frameworks, such
    as Tapestry, make it hard to register an object with a DC when it's
    created. What it all boils down to is transparency though. Since
    we're extending from CayenneDataObject it'll never be 100%
    transparent, but I don't want to have to think about satisfying some
    Cayenne requirement whenever I call a set or addTo method.

    I remember there being quite a bit of discussion about this in the
    past. I'd like to throw it back on the table and see who's
    interested in getting this going.

    -- 
    Kevin
    



    This archive was generated by hypermail 2.0.0 : Thu Sep 08 2005 - 22:38:36 EDT