db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Jefferson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-521) Create tests for relationship mapping (spec section 15.3)
Date Sun, 25 Nov 2007 14:49:43 GMT

    [ 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.


Mime
View raw message