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
UpdateFromQuery fails when using related entity in EF Core.
Note that it works in EF.
Exception
Microsoft.Data.SqlClient.SqlException (0x80131904): The multi-part identifier "r.PropInRelated" could not be bound.
The multi-part identifier "r.PropInRelated" could not be bound.
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs:line 1853
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnection.cs:line 611
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs:line 1327
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs:line 2550
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean isAsync, Int32 timeout, Boolean asyncWrite) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs:line 3233
at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String methodName) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs:line 1546
at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery() in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs:line 1090
at Z.EntityFramework.Extensions.BatchUpdate.<>c.(DbCommand , Nullable`1 )
at Z.EntityFramework.Extensions.BatchUpdate.Execute[T](IQueryable`1 query, Expression`1 updateFactory)
at BatchUpdateExtensions.UpdateFromQuery[T](IQueryable`1 query, Expression`1 updateFactory)
at Program.UpdateForOwnPropertiesUsingRelatedProperties()
at Program.RunTest(Expression`1 test)
ClientConnectionId:8737b8c8-ddf8-4ac2-96c6-7652d06b73b5
Error Number:4104,State:1,Class:16
The answer for this one will be similar to the one provided on: #484
Unfortunately, that's currently unsupported.
However, we are currently working hard to recode some parts of our library to be able to handle more complex scenarios like this one. I cannot provide any expected date but I believe it will come during this summer.
Description
UpdateFromQuery
fails when using related entity in EF Core.Note that it works in EF.
Exception
Fiddle or Project (Optional)
https://dotnetfiddle.net/g4Rq0T
Further technical details
The text was updated successfully, but these errors were encountered: