Skip to content

Commit 42fa774

Browse files
authored
fixing determining wrong primaryid field name for the referenced navigation property (#323)
1 parent 277657f commit 42fa774

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/powerplatform/services/data_record/api_data_record.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ func (client *DataRecordClient) GetEntityRelationDefinitionInfo(ctx context.Cont
235235
}
236236
for _, list := range manyToMany {
237237
item := list.(map[string]interface{})
238-
if item["Entity1NavigationPropertyName"] == relationLogicalName {
238+
if item["Entity1NavigationPropertyName"] == relationLogicalName && item["Entity1LogicalName"] != entityLogicalName {
239239
tableName = item["Entity1LogicalName"].(string)
240240
break
241241
}
242-
if item["Entity2NavigationPropertyName"] == relationLogicalName {
242+
if item["Entity2NavigationPropertyName"] == relationLogicalName && item["Entity2LogicalName"] != entityLogicalName {
243243
tableName = item["Entity2LogicalName"].(string)
244244
break
245245
}

0 commit comments

Comments
 (0)