A script-enabled browser is required for this page to function properly.

Triggers for Complex Master-Detail Relations

When you create a complex master-detail relation, Oracle Forms adds or edits the existing master-detail triggers to support the relation you have defined. The following example illustrates how Oracle Forms adds or edits triggers as required.

Master with Independent Details: Example

Consider a single relation A_B, with Delete Record Behavior property set to Non-Isolated and coordination property Deferred set to No (default settings). Oracle Forms creates the following triggers on the master block to manage the relation:

If you then create a second relation A_C (having the same master block but a different detail block), you have created a master-with-independent-details relation; that is, one master block with two detail blocks.

To manage this relation, Oracle Forms does not create any additional triggers. Instead, Oracle Forms adds a section to each existing trigger to facilitate clearing and populating the second detail block. The generated comments in these triggers delimit the sections that manage each detail block. For example, the comments in the On-Populate-Details trigger clearly show where each detail block section begins and ends:

-- Begin default relation program section
BEGIN
--
-- Begin first_detail_block program section
--
/* trigger text to clear the first detail block*/
--
-- End first_detail_block program section
--
--
-- Begin second_detail_block program section
--
/* trigger text to clear the second detail block*/
--
-- End second_detail_block program section
--
/* final trigger text */
END;
-- End default relation program section
--