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 "Abe White (JIRA)" <ji...@apache.org> on 2006/09/14 23:32:22 UTC

[jira] Created: (JDO-426) NullCollectionsAndIsEmpty does not unset mapped side of relation

NullCollectionsAndIsEmpty does not unset mapped side of relation
----------------------------------------------------------------

                 Key: JDO-426
                 URL: http://issues.apache.org/jira/browse/JDO-426
             Project: JDO
          Issue Type: Bug
          Components: tck20
    Affects Versions: JDO 2 final
            Reporter: Abe White


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);


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (JDO-426) NullCollectionsAndIsEmpty does not unset mapped side of relation

Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-426?page=all ]

Michael Bouschen reassigned JDO-426:
------------------------------------

    Assignee: Michael Bouschen

> NullCollectionsAndIsEmpty does not unset mapped side of relation
> ----------------------------------------------------------------
>
>                 Key: JDO-426
>                 URL: http://issues.apache.org/jira/browse/JDO-426
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Abe White
>         Assigned To: Michael Bouschen
>
> 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);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (JDO-426) NullCollectionsAndIsEmpty does not unset mapped side of relation

Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-426?page=all ]

Michael Bouschen resolved JDO-426.
----------------------------------

    Fix Version/s: JDO 2.0 TCK challenge fixes
       Resolution: Fixed

This needs to be fixed in the 2.0.1 branch, because the spec is ambiguous with respect to whether changes made on the mapped-by side are reflected in the database or not. The maintenance release will fix the spec and clarify that these changes are written to the database. So both test classes do not need to be changed in the trunk.

I changed classes NullCollectionsAndIsEmpty  and NullCollectionsAndContains in the branch 2.0.1 and added code to update the non mapped-by side of the relationship (see revision 452987).

> NullCollectionsAndIsEmpty does not unset mapped side of relation
> ----------------------------------------------------------------
>
>                 Key: JDO-426
>                 URL: http://issues.apache.org/jira/browse/JDO-426
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Abe White
>         Assigned To: Michael Bouschen
>             Fix For: JDO 2.0 TCK challenge fixes
>
>
> 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);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-426) NullCollectionsAndIsEmpty does not unset mapped side of relation

Posted by "Abe White (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-426?page=comments#action_12434815 ] 
            
Abe White commented on JDO-426:
-------------------------------

I didn't mean to set the priority of this issue to "Major".  Please consider a "Minor" issue.

> NullCollectionsAndIsEmpty does not unset mapped side of relation
> ----------------------------------------------------------------
>
>                 Key: JDO-426
>                 URL: http://issues.apache.org/jira/browse/JDO-426
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Abe White
>
> 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);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira