Skip to content

Commit

Permalink
fixing determining wrong primaryid field name for the referenced navi…
Browse files Browse the repository at this point in the history
…gation property (#323)
  • Loading branch information
polatengin authored Jun 6, 2024
1 parent 277657f commit 42fa774
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ func (client *DataRecordClient) GetEntityRelationDefinitionInfo(ctx context.Cont
}
for _, list := range manyToMany {
item := list.(map[string]interface{})
if item["Entity1NavigationPropertyName"] == relationLogicalName {
if item["Entity1NavigationPropertyName"] == relationLogicalName && item["Entity1LogicalName"] != entityLogicalName {
tableName = item["Entity1LogicalName"].(string)
break
}
if item["Entity2NavigationPropertyName"] == relationLogicalName {
if item["Entity2NavigationPropertyName"] == relationLogicalName && item["Entity2LogicalName"] != entityLogicalName {
tableName = item["Entity2LogicalName"].(string)
break
}
Expand Down

0 comments on commit 42fa774

Please sign in to comment.