Browse Source
Fix collection navigation entry comparison logic
pull/23329/head
maliming
1 year ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
6 additions and
1 deletions
-
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ChangeTrackers/AbpEntityEntry.cs
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
@ -51,8 +52,12 @@ public class AbpEntityEntry |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
if (navigationEntry.NavigationEntry is CollectionEntry && navigationEntry == entityEntryNavigationEntry) |
|
|
|
if (navigationEntry.NavigationEntry is CollectionEntry) |
|
|
|
{ |
|
|
|
if (navigationEntry != entityEntryNavigationEntry) |
|
|
|
{ |
|
|
|
continue; |
|
|
|
} |
|
|
|
navigationEntry.OriginalValue ??= new List<object>(); |
|
|
|
var ls = navigationEntry.OriginalValue.As<List<object>>(); |
|
|
|
ls.Add(entityEntry.Entity); |
|
|
|
|