What is a bug? especialy in a framework that is used to develop applications?
Is it only something that is described diferently in manual?
I will be writing more about that in this blog by presenting the functionality of the framework i am working on.
Jdeveloper and fusion middleware
Monday, November 15, 2010
Activation creates duplicate row when primary key is populated through DB trigger ((Fixed in 220.127.116.11)
The same issue as previus post is also reproduced if Primary key is populated through database trigger and Pk attribute is defined as DB Sequence and refresh after insert.
Fusion Developer's Guide for Oracle ADF
4.10.10 How to Get Trigger-Assigned Primary Key Values from a Database Sequence
To run the test case you need to create database trigger :
CREATE OR REPLACE TRIGGER LOCATIONS_PK BEFORE INSERT ON "LOCATIONS" FOR EACH ROW BEGIN IF INSERTING THEN IF :NEW."LOCATION_ID" IS NULL THEN SELECT LOCATIONS_SEQ.NEXTVAL INTO :NEW."LOCATION_ID" FROM DUAL; END IF; END IF; END;
When you try to insert second line, first line is dublicated, when testing activation safe.