Previous Topic: Define Table Override Trigger User-Defined Property ValuesNext Topic: Trigger Defaults for Relationships


Generate Default Triggers for a Model

Use the Forward Engineer Schema Generation dialog in a physical model to generate default triggers for a model.

To generate default triggers for a model

  1. Set the default referential integrity options for a model, and optionally override the default settings for individual relationships.
  2. Click Forward Engineer, Schema on the Actions menu.

    The Forward Engineer Schema Generation dialog opens.

  3. Select Trigger on the Options tab.

    A list of trigger choices is displayed on the right panel.

  4. Select the erwin Generated check box in the Trigger list and optionally select the RI Type Override or Relationship Override check boxes.
  5. Select one of the following options:
    Generate

    Generates the triggers directly to the target database.

    Preview

    Generates a preview of the triggers.

  6. Click OK.

    The Forward Engineer Schema Generation dialog closes.

Note: In erwin® Data Modeler version r7.3 and later, you can select to treat erwin-generated triggers as model objects. In earlier versions of the product, referential integrity information for erwin-generated triggers was generated as a comment in the body of the trigger. This mechanism stripped out erwin-generated triggers and parsed the referential integrity constraints during a "round trip" of the data model. A "round trip" occurs when you forward engineer a model to a database or script, then reverse engineer that database or script back to the model. You can now select to both forward-engineer and reverse-engineer erwin-generated triggers.

More information:

Set Default Referential Integrity Rules

Create erwin-Generated Triggers As Model Objects

Define Referential Integrity Trigger Actions for Relationships