Skip to content

Commit f69c691

Browse files
committed
Fix GetOrphans
1 parent fe0aa1b commit f69c691

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/NHibernate/Async/Collection/AbstractPersistentCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ protected virtual async Task<ICollection> GetOrphansAsync(ICollection oldElement
201201
{
202202
if (!currentObjects.Contains(id) && await (ForeignKeys.IsNotTransientSlowAsync(persister.EntityName, old, Session, cancellationToken)).ConfigureAwait(false))
203203
{
204-
res.Add(id);
204+
res.Add(old);
205205
}
206206
}
207207
}

src/NHibernate/Collection/AbstractPersistentCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ protected virtual ICollection GetOrphans(ICollection oldElements, ICollection cu
743743
{
744744
if (!currentObjects.Contains(id) && ForeignKeys.IsNotTransientSlow(persister.EntityName, old, Session))
745745
{
746-
res.Add(id);
746+
res.Add(old);
747747
}
748748
}
749749
}

0 commit comments

Comments
 (0)