1 Reply Latest reply on Jul 28, 2010 11:12 AM by cjmanju123

    Remove entity reference from another entity

    cjmanju123

      My environment



      1. JBOSS 5.1.0

      2. Seam 2.2.0

      3. Generated project using Jboss tools (eclipse)



      Entity objectA has reference to objectB. To remove this reference I am setting it to null, but when the page refreshes in the edit page of the objectA, it still shows the objectB. Please help.


      getInstance().setObjectB(null);
      


        • 1. Re: Remove entity reference from another entity
          cjmanju123

          Got it working with the following code.


               public void removeObjectB() {
                    if(getInstance() != null) {
                         objectBHome.clearInstance();
                         getInstance().setObjectB(null);
                    }
               }
          



          What was happening was, the wire method will be called after the action method which would rewire them again.