Hi -
I'm migrating some code from arcobjects that retrieves the Destination Primary key from IRelationshipClass2.
While the Attributed Relationship class definition has GetDestinationKeyField() member, RelationshipclassDefinition doesn't.
Is there some way to determine DestinationKey for non-attributed relationships with Pro?
Thanks, Kirk
Solved! Go to Solution.
Our names are confusing, but I think you're looking for RelationshipClassDefinition.GetOriginForeignKeyField.
For a non-attributed relationship class, the meanings of the fields are as follows:
OriginClass | The name of the origin table |
DestinationClass | The name of the destination table |
OriginKeyField | Primary key in the origin table |
OriginForeignKeyField | The primary key in the destination table (!), which is the foreign key for the relationship |
For attributed relationship classes, the meanings of the fields are as follows:
OriginClass | The name of the origin table |
DestinationClass | The name of the destination table |
OriginKeyField | Primary key in the origin table |
OriginForeignKeyField | The name of the field in the attributed relationship table that corresponds to the primary key of the origin table |
DestinationKeyField | The primary key in the destination table |
DestinationForeignKeyField | The name of the field in the attributed relationship class table that corresponds to the primary key of the destination table |
--Rich
Our names are confusing, but I think you're looking for RelationshipClassDefinition.GetOriginForeignKeyField.
For a non-attributed relationship class, the meanings of the fields are as follows:
OriginClass | The name of the origin table |
DestinationClass | The name of the destination table |
OriginKeyField | Primary key in the origin table |
OriginForeignKeyField | The primary key in the destination table (!), which is the foreign key for the relationship |
For attributed relationship classes, the meanings of the fields are as follows:
OriginClass | The name of the origin table |
DestinationClass | The name of the destination table |
OriginKeyField | Primary key in the origin table |
OriginForeignKeyField | The name of the field in the attributed relationship table that corresponds to the primary key of the origin table |
DestinationKeyField | The primary key in the destination table |
DestinationForeignKeyField | The name of the field in the attributed relationship class table that corresponds to the primary key of the destination table |
--Rich