Constraint Names for subtype-supertype relationships

In our Logical model, I set the 'Constraint Name' on all of the relationships automatically using a macro, for example "FK_OrderItem_to_Order".

These constraint names obviously carry through to the generated Physical model, and into the DDL.

But for subtype clusters I cannot find how to set the constraint names on the Logical model, either manually in the UI, or via the macros.

Instead, they get set automatically by ER Studio (eg. "fk_fk__2_1"), but sometimes it generates duplicates with the name "fk_fk_"

So, does anyone know how to set the constraint names, both manually in the UI, and via automation objects?

btw I can set them on the Physical model (because the subtype clusters are replaced by simple foreign keys) but I do not want to do this because we always generate a new Physical model directly from the Logical model.


  • duplicate name generation actually only occurs when I have applied Naming Standards. The example below had 'fk_' as the prefix for keys. So it just combines the prefix with the blank constraint name.
  • If I do NOT apply Naming Standards, then ER Studio does generate unique names, such as 'Ref1' for the indexes, and uses the FK attribute name for the FK constraint name.   But I do want to use Naming Standards.  And in case, I want to be able to set the constraint names myself, hence the question above.
No Data
  • I've discovered that the 'Model.Relationships' property includes subtype relationships, and therefore allows me to set the constraint/FK names for them in the logical model.  But if I use 'Entity.ChildRelationships' (or Entity.ParentRelationships) the subtype relationships are NOT included!  A little strange.  Anyway, this has solved my issue above.

No Data