localObjects() and MODIFIED objects, cloning DataObjects

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Jan 19 2005 - 14:40:37 EST

  • Next message: Andrus Adamchik: "Re: localObjects() and MODIFIED objects, cloning DataObjects"

    Is there a reason why a MODIFIED object couldn't be copied into a new
    context?

    I've never had the need to do it, but I don't see why it would be
    disallowed.

    It'd require a new method call in localObjects to copy a DataObject. We've
    seen a number of requests to copy DataObjects pop up in the past on the user
    list, and I can't help but wonder if perhaps the ability to clone a
    DataObject should be added to DataObjectUtils (or even to DataObject
    itself).

    If so, I'd say it needs to support two versions: copy with same objectId,
    copy with new objectId.

    For relationships, I'd say just set them all as faults in the copy.

    And while we're on the subject, I think it'd be nice to provide read-only
    access to the CayenneDataObject values Map keys so an end-user can iterate
    through them.

    -Mike



    This archive was generated by hypermail 2.0.0 : Wed Jan 19 2005 - 14:40:29 EST