Sometimes user need to change foreign key attribute value in ADF table’s master detail relationship. If you try to change master table’s foreign key value, you’ll get the following integrity constraint error message.
To resolve this issue, if user want to change a foreign key attribute in master table, then child table attribute’s value should also change consequently.
ADF has predefined features for this requirement.
- Go to Master Detail Association.
- In Behavior tab under relationship, check composition association.
- Then check “Cascade update key attributes”.
Output: – This will result the following. When we change the department id in master table, then on child table department id automatically gets changed.