Skip navigation

BEFORE-COMMIT trigger

score 220
You have not voted. Active

Some business rules can only be validated at commit time. An example would be: a new department needs one manager and at least one other employee. This involves 3 inserts: one department, one manager and one employee. The rule fails on any of these individual inserts, but not on the commit, when these three inserts have taken place. So, you can only validate this rule in some sort of BEFORE-COMMIT trigger.

 

Oracle Forms has a nice trigger for this kind of functionality (Post-Forms-Commit):

Fires once during the Post and Commit Transactions process.  If there are records in the form that have been marked as inserts, updates, or deletes, the Post-Forms-Commit trigger fires after these changes have been written to the database but before Form Builder issues the database Commit to finalize the transaction.

 

(and I believe ADF 12c now also has a before commit trigger).

 

It would be great to have this kind of functionality on database level.

Comments

Vote history