2 Replies Latest reply: Feb 2, 2014 8:46 PM by 999 RSS

    ViewObject with Multiple Updateable Dependent Entities but getEntity(1) returns null

    999

      Hi,

       

      I am using JDev. 11.1.1.7.0

       

      I am using a single view object to update multiple EO (Department,Employees) I have gone through this thread HOWTO: Implementing a ViewObject with Multiple Updateable Dependent Entity Objects

       

       

       

      But, when I press the createinsert button then in DepEmplImpl class

       

      protected void create(AttributeList attributeList) {
          DepartmentImpl newDepartment = getDepartment();
          EmployeeImpl     newEmployee = getEmployee();
           try {
              newDepartment.create(attributeList);
              newEmployee.create(newDepartment);
           }
           catch (JboException ex) {
             newDepartment.revert();
             newEmployee.revert();      
             throw ex;
           }
           catch (Exception otherEx) {
             newDepartment.revert();
             newEmployee.revert();      

             throw new RowCreateException(true,"Department",otherEx);
           }
        }

       

       

       

      newEmployee is null because getEntity(1) is returning null. I have the correct association between the two entity objects

       

      Any idea??