You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Andy Jefferson (JIRA)" <ji...@apache.org> on 2007/11/25 15:49:43 UTC

[jira] Commented: (JDO-521) Create tests for relationship mapping (spec section 15.3)

    [ https://issues.apache.org/jira/browse/JDO-521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545269 ] 

Andy Jefferson commented on JDO-521:
------------------------------------

In file src/java/org/apache/jdo/tck/mapping/RelationshipNegative1To1Test.java the tests
"testSetOtherSideToNullMappedBy", "testSetOtherSideToNullMapped" are badly defined. 
By this I mean you have objects "emp1", "emp2", "medIns1", "medIns2" that have no relations after setUp(). In the test you then rely on 
medIns2.setEmployee(null);   or   emp1.setMedicalInsurance(null);
and expect the implementation to interpret this as "the relation has been changed at this other side to something inconsistent". But it was null before those setter calls and is still null and so the implementation is entitled to ignore the setter call as not changing anything. Perhaps if the tests were changed to have a relation first, and then nulling it out that would be reasonably interpreted as an inconsistent update.

> Create tests for relationship mapping (spec section 15.3)
> ---------------------------------------------------------
>
>                 Key: JDO-521
>                 URL: https://issues.apache.org/jira/browse/JDO-521
>             Project: JDO
>          Issue Type: Test
>          Components: tck2
>    Affects Versions: JDO 2 maintenance release 1
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>         Attachments: JDO-521.patch
>
>
> We need a set of tests to test that an implementation syncs both sides of a relationship on flush().

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