When scripting a constraint in the ERM the constraint schema and name do not get scripted. class ScriptConstraint.scriptCREATE() method determines if the schema name and constraint name will be scripted by the variable includeTableConstraintsNames. This variable is passed to the method EConstraint. Its retrieved from the class ScriptFormat. In script format a boolean varaible includeTableConstraintNames is declared but not set, so default will be false. This class has a method setIncludeTableConstraintNames() this is only ever called from the CompareView class. This means the only time the constraint schema and name will ever get scripted is if the compareView class is part of the scripting. You will notice that in version 13 the constraint names where been scripted and as of version 14 they stopped getting scripted in the ERM.
Can we find out of this was intentional? if it was why? code changes where made for issue #10697
EConstraint, line 324, revision 34759, 11/8/2013, the include table constraint name was changed from "TRUE" to variable that is always false at this code point.
In the ERM, primary key constraints will always script there name in the SQL Preview tab.
Committed revision: 49577
In the ERM, primary key constraints will always script there name in the SQL Preview tab.
Committed revision: 49577
Issue #14407 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v17.0.4-3, v18.0.0-devi-121 |
No time estimate |
1 issue link |
relates to #10697
Issue #10697Comparing two ER Models always includes schema name in compare |
EConstraint, line 324, revision 34759, 11/8/2013, the include table constraint name was changed from "TRUE" to variable that is always false at this code point.