Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-996

Incorrect deletion logic is generation for OneToOne relationships and inverse sides of ManyToMany relationships

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.3.3.Final
    • 1.3.2.Final
    • Scaffold
    • None

      Given two classes Foo and Bar the following deletion code is generated for bidirectional OneToOne relationship between them:

      FooBean.java
      Foo foo = deletableEntity.getFoo();deletableEntity.setBar(null);this.entityManager.merge(foo);
      
      BarBean.java
      Example bar = deletableEntity.getBar();deletableEntity.setFoo(null);this.entityManager.merge(bar);
      

      This is incorrect - the setters on the deletableEntity should not be invoked.

              vineet.reynolds_jira Vineet Reynolds (Inactive)
              vineet.reynolds_jira Vineet Reynolds (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: