Define Foreign Key Name Template

Enterprise Architect enables you to customize the way Foreign Key relationships are named by default. This is helpful if you have specific modeling conventions that stipulate how Foreign Keys are documented.

By changing the Foreign Key Name Template, you adjust the name that Enterprise Architect assigns to the Association connector and the Operation that define the Foreign Key relationship.

Access:    Tools | Options | Source Code Engineering | Code Editors: DDL Name Template

How To:

To define the name template for a Foreign Key, follow the steps below:

Step

Action

See Also

1

Select the Code Editors menu option

The Code Editors page of the Options dialog displays

 

2

Click on the DDL Name Template button

The DDL Name Template dialog displays, showing the default name templates

 

3

Edit or replace the name template in the Foreign Key Name Template field

For example, if you want to display the Foreign Key description as

FK_foreigntablename_FKcolumnname_primarytablename_PKcolumnname

then change the Foreign Key Name Template field to

FK_%foreigntablename%_%fkcolumnname%_%primarytablename%_%pkcolumnname%.

 

4

Click on the Save button.