Import relationship between existing columns using macro


I am trying to find a solution using macro to import\create relationship between two existing column in different entities.

Default macro's only allows to establish the relationship at entity level, but there is no option to provide the parent and child attributes of that relationship

No Data
  • You might want to check out the sample macro called Import Relationships from Excel.  There is a method on the Relationships collection called AddWithRoleName although I have had varying degrees of success with that.

    Not sure what you mean about specifying the Parent attribute - that would always be the PK columns from the parent.  The only thing you can control is the name of the propogated column in the child table.

    If the Parent PK is multiple columns and you don't want them all in the child, you would have to use the 'Hide Key Attribute' on that column in the child table, which is a property of the attribute (HIdden), not the relationship.