You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Victor Antonovich (JIRA)" <ji...@apache.org> on 2010/01/27 15:54:38 UTC

[jira] Commented: (CAY-1378) Error unsetting to-many DataObject property

    [ https://issues.apache.org/jira/browse/CAY-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805523#action_12805523 ] 

Victor Antonovich commented on CAY-1378:
----------------------------------------

Seems like this bug has appeared in 3.0 beta 1 and is related to fix of CAY-1009. Rolling back patch from CAY-1009 lets testcase run without errors. 
Looks like this fix broke reverse relationships searching mechanism for relationships between inherited data objects.

> Error unsetting to-many DataObject property
> -------------------------------------------
>
>                 Key: CAY-1378
>                 URL: https://issues.apache.org/jira/browse/CAY-1378
>             Project: Cayenne
>          Issue Type: Bug
>    Affects Versions: 3.0RC1
>            Reporter: Victor Antonovich
>         Attachments: CAY1009SideEffectTest.patch
>
>
> Project with flattened relationships between inherited objects can't handle correctly removing of relationship when one of objects is removed. Following patch add the testcase which is failing in both 3.0RC1 and trunk branches with message:
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.027 sec <<< FAILURE!
> testCAY1009SideEffect(org.apache.cayenne.UserManagerTest)  Time elapsed: 0.023 sec  <<< ERROR!
> org.apache.cayenne.reflect.PropertyException: [v.3.0RC1 Ñ.нв 27 2010 13:48:57] Error unsetting to-many DataObject property: roleGroups
>         at org.apache.cayenne.reflect.generic.DataObjectToManyProperty.removeTarget(DataObjectToManyProperty.java:91)
>         at org.apache.cayenne.access.DataContextDeleteAction$1.visitToMany(DataContextDeleteAction.java:212)
>         at org.apache.cayenne.reflect.generic.DataObjectToManyProperty.visit(DataObjectToManyProperty.java:111)
>         at org.apache.cayenne.access.DataContextDeleteAction.processDeleteRules(DataContextDeleteAction.java:202)
>         at org.apache.cayenne.access.DataContextDeleteAction.deletePersistent(DataContextDeleteAction.java:107)
>         at org.apache.cayenne.access.DataContextDeleteAction.performDelete(DataContextDeleteAction.java:92)
>         at org.apache.cayenne.access.DataContext.deleteObject(DataContext.java:931)
>         at org.apache.cayenne.UserManagerTest.testCAY1009SideEffect(UserManagerTest.java:39)
> Caused by: java.lang.NullPointerException
>         at org.apache.cayenne.CayenneDataObject.removeToManyTarget(CayenneDataObject.java:250)
>         at org.apache.cayenne.reflect.generic.DataObjectToManyProperty.removeTarget(DataObjectToManyProperty.java:85)
>         ... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.