I have a macro for generating meaningful Constraint Names on relationships.
I'm using the following, which works fine for all ordinary relationships:
For Each relp In ent.ChildRelationships etc...However, this does not include relationships to supertypes (ie. the FK relationship from a subtype PK to the supertype).I cannot see any property on the 'Entity' object for accessing these relationships within the macro.Does anyone know how to access them? I've looked at 'SubTypeClusters' on the Model object, but cannot see any attributes on SubTypeCluster for setting the constraint name or getting a Relationship entity..
I'm confused by your question - there is no constraint name associated with Supertype / Subtype relationship. You can't define it in the ER Studio user interface - if you can't define it in the UI, you won't be able to define it in a macro either. The only thing you can edit on a SuperType / Subtype relationship is the rolename of the column.
I've found that when I loop through relationships in the model, I can find the parent-child relationship (eg. between PERSON and PARTY entity), and can set its businessName, and Name (ie. ConstraintName), even though (as you say), there is nowhere in the UI to do the same. However I'm not easily able to identify that the relationship is a subtype relationship, as it is just of type 0 (identifying). But I can work around this, now that I know that the relationship does exist as an ordinary 'Relationship' object so that I can set its properties.
Powered by IDERA