Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1118

ROP: setToXXX(null) does not update reverse rel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0M5
    • Core Library
    • None

    Description

      Following test fails. The reason is that setToXXX(null) causes an invalidation on reverse property but not a removal of reverse object

      ClientMtTable1 o1 = context.newObject(ClientMtTable1.class);
      ClientMtTable2 o2 = context.newObject(ClientMtTable2.class);
      o2.setTable1(o1);

      assertEquals(1, o1.getTable2Array().size());
      context.commitChanges(); //important line!

      o2.setTable1(null);
      assertEquals(0, o1.getTable2Array().size());

      Attachments

        Activity

          People

            antidote Andrey Razumovsky
            antidote Andrey Razumovsky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: