cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CAY-1378) Error unsetting to-many DataObject property
Date Sun, 07 Feb 2010 15:10:28 GMT

     [ https://issues.apache.org/jira/browse/CAY-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrus Adamchik updated CAY-1378:
---------------------------------

    Attachment: 0001-CAY-1378-no-reverse-for-inheritance.patch

I tend to agree with Victor. Here is my patch reverting CAY-1009 commit (plus some minor loop
refactoring). This fails uncommented InheritanceTest, but I think the test is wrong. I won't
commit this yet, and will take further discussion to the dev list. 

> 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: 0001-CAY-1378-no-reverse-for-inheritance.patch, 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.


Mime
View raw message