Re: Duplicate CayenneDataObject

From: Elia Morling (eli..amiljen.se)
Date: Sat Jul 31 2004 - 05:15:01 EDT

  • Next message: Mike Kienenberger: "Re: Duplicate CayenneDataObject"

    > Wouldn't such a method create numerous problems with deep and/or shallow
    > copies, and duplication of relationships?

    Yes if it has a to-many relationship, but there are plenty of leaves at the bottom
    of the tree using only parents. Which in many cases will be created and duplicated
    often.

    1. Validate object to make sure it doesn't have a to-many relationship
    2. CreateAndRegisterNewObject with the class of the source object
    3. For each property in source object writeProperty() in new object
    4. Pass along any exceptions

    Elia

    ----- Original Message -----
    From: "Gary Jarrel" <garyjarre..rownbilljarrel.com.au>
    To: <cayenne-use..bjectstyle.org>
    Sent: Saturday, July 31, 2004 10:03 AM
    Subject: RE: Duplicate CayenneDataObject

    > Wouldn't such a method create numerous problems with deep and/or shallow
    > copies, and duplication of relationships?
    >
    > - Gary
    >
    > -----Original Message-----
    > From: Elia Morling [mailto:eli..amiljen.se]
    > Sent: Saturday, July 31, 2004 6:51 AM
    > To: Cayenne mailing list post
    > Subject: Duplicate CayenneDataObject
    >
    > Is there anything like this?
    >
    > DataContext.duplicateAndRegisterNewObject(DataObject anObject)
    >
    > It would duplicate all the data of a DataObject and register it within the
    > DataContext.
    >
    > Elia
    >
    >
    >
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Sat Jul 31 2004 - 05:15:10 EDT