Re: Deleted objects showing up a serialized data context

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Jul 28 2006 - 13:57:24 EDT

  • Next message: Mike Kienenberger (JIRA): "[JIRA] Created: (CAY-615) Delete Rule Cascade with Deny on reverse relationship always fails."

    On Jul 28, 2006, at 1:53 PM, Mike Kienenberger wrote:

    > On 7/27/06, Mike Kienenberger <mkienen..mail.com> wrote:
    >> On 7/26/06, Mike Kienenberger <mkienen..mail.com> wrote:
    >> > And with the changes to ToManyList, I've now been able to see that
    >> > removedFromUnresolved contains a reference to my deleted object.
    >>
    >> I'm now thinking that the solution to this problem is to not add NEW
    >> or TRANSIENT objects to the removedFromUnresolved list. These
    >> objects will never be removed from a database fetch list as they
    >> don't
    >> exist in the database, so there's no point in keeping a reference to
    >> them.
    >
    > Ok. I'm starting to second-guess myself. Are there cases when a
    > transient object might be in the database? What if a committed
    > object is unregistered from the DataContext? Maybe it's not really
    > worth worrying about since unregistering objects is pretty rare.

    The point is that a transient object is not tracked by Cayenne, so
    keeping it in 'removedFromUnresolved' is wrong as far as I can tell.

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Jul 28 2006 - 13:57:44 EDT