You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An exception thrown inside the try section in LazyLoader.Load(..) can be hidden by an exception thrown from the InternalEntry.SetIsLoaded(..) method.
In my case, I was using EFCore 8.0.6 and received the following exception:
InvalidOperationException: The navigation 'EntityOne.EntityTwo' cannot have 'IsLoaded' set to false because the referenced entity is non-null and is therefore loaded.
Then, I forked and added logging before settingentry.IsLoaded = false and got the original exception:
Microsoft.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 739) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. Which was not being propagated before the addition.
Unfortunately, reproducing the issue is quite complex and I cannot attach it.
An exception thrown inside the try section in
LazyLoader.Load(..)
can be hidden by an exception thrown from theInternalEntry.SetIsLoaded(..)
method.In my case, I was using EFCore 8.0.6 and received the following exception:
Then, I forked and added logging before setting
entry.IsLoaded = false
and got the original exception:Unfortunately, reproducing the issue is quite complex and I cannot attach it.
Include provider and version information
EF Core version: 8.0.6
Database provider: MsSqlServer
Target framework: net8
Operating system: ubuntu
The text was updated successfully, but these errors were encountered: