Posts

Showing posts from November, 2014

Controlling Entity posting order or commit order in ADF

Image
Hi All, In this blog I am going to show how you can control the entity posting order to database or in simple way you can say how we can control commit order of Entity Objects in ADF. Scenario : Suppose if you have two table like EMPLOYEES and DEPARTMENTS. You have created Entity Object EmployeesEO and DepartmentsEO. Now in doDML INSERT method of the EmployeesEO you want to insert the row in DepartmentEO and commit it to database. Now if you have some trigger on EMPLOYEES table which is checking the newly inserted row and throwing error if it is not there. Suppose your trigger code is like this:   CREATE OR REPLACE TRIGGER "HR"."EMP_DEPT_TRG"   BEFORE INSERT ON employees   FOR EACH ROW   DECLARE   pcount NUMBER := 0;   BEGIN  IF (:NEW.DEPARTMENT_ID != 0) THEN     SELECT COUNT(1)          INTO pcount      ...