I am using Jdeveloper 22.214.171.124.0. I have a ADF table where we can copy lines and delete lines. I get unique constraint error when I save. Looks like the insert operation in happening before the delete operation. Is there a way to set the execution order so that the logical behaviour is delete/update/insert.
If you have define primary key for you table Copy lines and commit may cause to the Error,As Dario said you can use postChanges() for every transaction and if error occurred update record proper way and finally do commit if all transactions are valid.
The unquie contraint is not from the primary key. There are three columns in the table (batch_id, line_number, line_type) which must be unique. In the UI, the user can delete lines, update lines and add lines and finally click the save button that does the commit. On delete the line_number gets re-numbered. So when committing, the unique error occurs because the line number already exists. Looks like insert is happening before update/delete. I cannot do commit after each delete/update/insert. I have to do it only if the user clicks the save button in the end. Is there a way to control the order of execution?