Issue Details (XML | Word | Printable)

Key: JDO-426
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Michael Bouschen
Reporter: Abe White
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

NullCollectionsAndIsEmpty does not unset mapped side of relation

Created: 14/Sep/06 09:32 PM   Updated: 04/Oct/06 07:41 PM
Return to search
Component/s: tck2
Affects Version/s: JDO 2 final
Fix Version/s: JDO 2 TCK challenge fixes

Time Tracking:
Not Specified

Resolution Date: 04/Oct/06 07:41 PM


 Description  « Hide
org.apache.jdo.tck.query.jdoql.NullCollectionsAndIsEmpty uses its localSetUp() method to null the projects of an Employee. However, the Employee.projects field uses mapped-by in its mapping, and per section 15.3 of the JDO 2 spec, that means changes to it aren't reflected in the datastore. To fix, add the following lines after retrieving "emp1" but before nulling its projects in localSetUp():

        for (Iterator itr = emp1.getProjects().iterator(); itr.hasNext();)
            ((Project) itr.next()).removeMember(emp1);


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #452987 Wed Oct 04 19:36:15 UTC 2006 mbo JDO-426: update both sides of the employee<->project relationship
Files Changed
MODIFY /db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndContainsMethod.java
MODIFY /db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndIsEmpty.java