cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <mgen...@masslight.net>
Subject Re: Exception Deleting DataObject with to-many relationship
Date Fri, 27 Nov 2009 15:03:32 GMT
Is childList the same as salesOrderList?


On Thu, Nov 26, 2009 at 6:29 PM, Joe Baldwin <jfbaldwin@earthlink.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
>
>

Mime
View raw message