Re: Exception Deleting DataObject with to-many relationship

From: Michael Gentry (mgentr..asslight.net)
Date: Fri Nov 27 2009 - 10:03:32 EST

  • Next message: Joe Baldwin: "Re: Exception Deleting DataObject with to-many relationship"

    Is childList the same as salesOrderList?

    On Thu, Nov 26, 2009 at 6:29 PM, Joe Baldwin <jfbaldwi..arthlink.net> wrote:
    > I am getting an odd exception when I attempt to delete a DataObject with a "to-many" (aka child list).
    >
    > Here is the pseudo code:
    >
    > 1. deleteObjects(parent.getChildList())
    > 2. deleteObject(parent)
    > 3. objectContext.commitChanges()
    >
    > on Exception
    >        objectcontext.rollbackChanges()
    >
    >
    > It is very odd but I am getting the following error:
    >
    > org.apache.cayenne.reflect.PropertyException:
    > [v.3.0B1 Nov 03 2009 19:16:06]
    > Error unsetting to-many DataObject property: salesOrderList
    >
    > But it is deleting all the associated database rows.
    >
    > Am I missing a step in the delete procedure?
    >
    > thanks,
    > Joe
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Nov 27 2009 - 10:04:30 EST