Parameters
- originRow
- The Row from the origin table.
- destinationRow
- The Row from the destination table.
- attributes
- A RowBuffer created from the CreateRowBuffer method and populated with desired values.
Exception | Description |
---|---|
System.ArgumentException | originRow, destinationRow or attributes is null. |
ArcGIS.Core.Data.Exceptions.GeodatabaseException | A geodatabase-related exception has occurred. |
For relationships of type RelationshipCardinality.OneToOne, RelationshipCardinality.OneToMany and RelationshipCardinality.ManyToMany that have user-attributes defined (vs. system generated), an intermediate table will be created to store relationships between the rows with corresponding origin and destination foreign key values.
When calling CreateRelationship(Row,Row,RowBuffer), the origin row's primary key value will be written into the field specified by AttributedRelationshipClassDefinition.GetDestinationKeyField in the intermediate table. Likewise, the destination row's primary key value will be written into the field specified by AttributedRelationshipClassDefinition.GetDestinationForeignKeyField in the intermediate table. Therefore it is possible that you could overwrite, and therefore delete, an existing relationship. The rest of the attributes values in attributes with be written to the corresponding user-defined fields in the intermediate table.
For relationships of type RelationshipCardinality.ManyToMany that do not have user-attributes defined (hence, the intermedidate table has only system-generated fields), attributes has no effect on the intermediate table.
Target Platforms: Windows 11, Windows 10