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

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development