You can use the Relationship Templates dialog in a physical model to create a relationship override trigger template.
To create a relationship override trigger template
The Relationship Template dialog opens.
Displays the name of the database action and referential integrity action (for example, CHILD INSERT SET NULL) that causes the associated trigger to fire. Select the RI action to which you want to attach the new template in the Referential Integrity Type list and click Attach.
Displays the name of the user override trigger template that you want to generate for the corresponding referential integrity type. If the option is blank (- - -), you generate the template associated with the relationship type and RI action at the global level.
Detaches the trigger template override from the associated referential integrity type. You generate the template associated with the relationship type and RI action at the global level if it does not have an associated override trigger template.
Lists the standard CA ERwin Data Modeler built-in trigger templates. To create a new template from an existing template, select the template in the Built-in Trigger Template or User Override list, enter a name for the new template in the Template Name box, and click Add.
Lists the user-defined trigger templates available in a model.
Attaches the selected user-defined trigger template to the selected referential integrity type.
Creates a user-defined trigger template and adds it to the User Override list.
Deletes the selected user-defined trigger template.
Displays the name of the selected template. Enter a new name for the new template in the Template Name box and click Add to create a new, blank template.
Displays the template code in the selected built-in or user-defined trigger template. To add macro code, position the cursor in the Template Code box where you want the macro to be inserted, click Macro Toolbox to select a macro, double-click the macro to insert the macro code in the Template Code box, and enter the parameters, if any, in the Template Code box.
Displays the trigger code as it will appear in the physical schema.
Opens the Macro Toolbox where you can select a macro to add to the trigger template.
Click Close.
Your changes are saved and the dialog closes.
Note: You must select the User-Defined and Relationship Override check boxes for triggers during schema generation to generate a relationship override template in the schema.
Copyright © 2013 CA.
All rights reserved.
|
|