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
EF Core throws a System.InvalidOperation when trying to bulk update (with RelationalQueryableExtensions.ExecuteUpdate<TSource> (link) (or delete) property of an owned entity through the owner.
System.InvalidOperationException : The LINQ expression 'DbSet<FileVersion>()
.Where(f => f.FileId == __request_FileId_0)
.Select(f => IncludeExpression(
EntityExpression:
IncludeExpression(
EntityExpression:
f,
NavigationExpression:
EF.Property<EntityChangeTime>(f, "Date"), Date)
,
NavigationExpression:
EF.Property<EntityChangeUser>(f, "User"), User)
)
.ExecuteUpdate(conf => conf.SetProperty<DateTime?>(
propertyExpression: v => v.Date.Deleted,
valueExpression: __request_DeletedTime_1))' could not be translated. Additional information: The following lambda argument to 'SetProperty' does not represent a valid property to be set: 'v => v.Date.Deleted'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass12_0`1.<ExecuteAsync>b__0()
at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.RelationalQueryableExtensions.ExecuteUpdateAsync[TSource](IQueryable`1 source, Expression`1 setPropertyCalls, CancellationToken cancellationToken)
at DocumentManager.Data.Core.Repository.Default.FileRepository.<>c__DisplayClass7_0.<<DeleteFile>b__0>d.MoveNext() in /Users/sudara/Developer/DocumentManager/Data/DocumentManager.Data.Core/Repository/Default/FileRepository.cs:line 110
EF Core throws a
System.InvalidOperation
when trying to bulk update (withRelationalQueryableExtensions.ExecuteUpdate<TSource>
(link) (or delete) property of an owned entity through the owner.Schema
Owned Entity:
Owners:
Entity Configuration:
Generated Migration:
Repository class where
ExecuteUpdate
is used:Stack trace
Pprovider and version information
EF Core version: 7.0.5
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 7.0
Operating system: macOS 13.3.1 (a)
IDE: Jet Brains Rider 2023.1.1
The text was updated successfully, but these errors were encountered: