Setting Relation Properties that Affect Coordination
When you create a master-detail relation, you must decide how Oracle Forms should manage coordination between the master and detail blocks.
Specifically, you need to answer the following questions:
- Should end users be able to delete a master record if there are associated
detail records present?
- If end users can delete a master record, should Oracle Forms delete the
associated detail records also?
- If an end user makes a new record in the master block the current record,
should Oracle Forms fetch the associated detail records immediately, or
wait until the end user navigates to the detail block?
The answers to these questions will depend on application-specific requirements. By setting the properties of the relation object, you can implement the master-detail functionality most appropriate for your application.
The properties that affect the functionality of a relation include Delete Record Behavior, Coordination, and Prevent Masterless Operation.
Delete Record Behavior Property
The Delete Record Behavior property (formerly called the Master Deletes property)
allows you to specify how the deletion of a record in the master block should
affect records in the detail block. You can specify Cascading, Isolated, or
Non-Isolated:
-
- The master record can be deleted, and any associated detail records are
automatically deleted from the database at commit time. If relations are nested
to several levels, only records in the immediate detail block are deleted.
That is, deletions do not automatically cascade to multiple levels of a relation
chain.
-
-
-
- The master record can be deleted, but the associated detail records are
not deleted from the database.
-
-
-
- The default setting. The master record cannot be deleted if associated detail
records exist in the database.
Note: If your database is using the ORACLE7 Server cascading deletes feature, do not use the Cascading deletes option in Oracle Forms.
Coordination Properties
The values of the coordination properties Deferred and Auto Query determine
when the population phase of block coordination will occur:
- (Deferred = No)
-
- The default setting. When a coordination-causing event occurs, Oracle Forms
fetches the detail records immediately.
-
- (Deferred = Yes, Auto
Query = No)
-
- When a coordination-causing event occurs, Oracle Forms does not automatically
fetch the detail records. To fetch the detail records, the end user must navigate
to the detail block and explicitly execute a query.
-
- (Deferred
= Yes, Auto Query = Yes)
-
- When a coordination-causing event occurs, Oracle Forms defers fetching
the associated detail records until the end user navigates to the detail block.
Related topics
About block coordination
Choosing the appropriate coordination