Re: Reconnecting serialized DataObjects

From: Mike Kienenberger (mkienen..mail.com)
Date: Tue Sep 27 2005 - 15:10:16 EDT

  • Next message: Andrus Adamchik: "Re: Reconnecting serialized DataObjects"

    Well, I guess that's one way to get me to fix CAY-380 :)

    I'll probably work on this soon.

    The registeredObject() example you provided above has already solved
    one weird issue I was seeing earlier today when I started deleting
    objects.

    When I get it all figured out, I'll try to write up a wiki article on
    it since the question comes up every so often.

    Thanks again!

    On 9/27/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
    >
    > On Sep 27, 2005, at 12:48 PM, Mike Kienenberger wrote:
    > > However, in the case where the DataContext is no longer the same,
    > > won't I lose all new and modified objects?
    > >
    > > I don't want to serialize the entire DataContext and ObjectStore. I
    > > only want to preserve a few specific items, and almost always those
    > > objects are in a modified or new state.
    >
    >
    > The same idea should work for different DataContext and for modified/
    > new/deleted objects. First I think CayenneDataObject readObject/
    > writeObject can stay unchanged (never mind Externalizable interface I
    > put in my example in CAY-298 attachment).
    >
    > In "readResolve" you'd have to call DataContext.localObjects()
    > instead of "registeredObject()". But this would require fixing
    > CAY-380 - I think this is the only piece missing from the picture.
    >
    > Andrus
    >



    This archive was generated by hypermail 2.0.0 : Tue Sep 27 2005 - 15:10:18 EDT