JDO
  1. JDO
  2. JDO-426

NullCollectionsAndIsEmpty does not unset mapped side of relation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JDO 2 final (2.0)
    • Fix Version/s: JDO TCK challenge fixes
    • Component/s: tck
    • Labels:
      None

      Description

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

        Activity

        Abe White created issue -
        Michael Bouschen made changes -
        Field Original Value New Value
        Assignee Michael Bouschen [ mbo ]
        Michael Bouschen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fix Version/s JDO 2.0 TCK challenge fixes [ 12312093 ]
        Andy Jefferson made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Michael Bouschen
            Reporter:
            Abe White
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development