{"record":{"id":"0c35017793c80509","repo":"dotnet/efcore","slug":"the-provider-in-use-does-not-support-partial-updat","errorCode":null,"errorMessage":"The provider in use does not support partial updates with ExecuteUpdate within JSON columns.","messagePattern":"The provider in use does not support partial updates with ExecuteUpdate within JSON columns\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitor.ExecuteUpdate.cs","lineNumber":923,"sourceCode":"    /// <summary>\n    ///     Provider extension point for implementing partial updates within JSON columns.\n    /// </summary>\n    /// <param name=\"target\">\n    ///     An expression representing the target to be updated; can be either <see cref=\"JsonScalarExpression\" />\n    ///     (when a scalar property is being updated within the JSON column), or a <see cref=\"JsonQueryExpression\" />\n    ///     (when an object or collection is being updated).\n    /// </param>\n    /// <param name=\"value\">The JSON value to be set, ready for use as-is in <see cref=\"QuerySqlGenerator\" />.</param>\n    /// <param name=\"existingSetterValue\">\n    ///     If a setter was previously created for this JSON column, it's value is passed here (this happens when e.g.\n    ///     multiple properties are updated in the same JSON column). Implementations can compose the new setter into\n    ///     the existing one (and return <see langword=\"null\" />), or return a new one.\n    /// </param>\n    protected virtual SqlExpression? GenerateJsonPartialUpdateSetter(\n        Expression target,\n        SqlExpression value,\n        ref SqlExpression? existingSetterValue)\n        => throw new InvalidOperationException(RelationalStrings.JsonPartialExecuteUpdateNotSupportedByProvider);\n\n    private static T? ParameterValueExtractor<T>(\n        QueryContext context,\n        string baseParameterName,\n        List<IComplexProperty>? complexPropertyChain,\n        IProperty property)\n    {\n        var baseValue = context.Parameters[baseParameterName];\n\n        if (complexPropertyChain is not null)\n        {\n            foreach (var complexProperty in complexPropertyChain)\n            {\n                if (baseValue is null)\n                {\n                    break;\n                }\n","sourceCodeStart":905,"sourceCodeEnd":941,"githubUrl":"https://github.com/dotnet/efcore/blob/3a2006ef569de08368d59db5e1468aa8f407e4f8/src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitor.ExecuteUpdate.cs#L905-L941","documentation":"Default implementation of the protected virtual GenerateJsonPartialUpdateSetter hook. The base relational provider does not know how to emit the provider-specific JSON modification function (e.g. JSON_MODIFY), so any ExecuteUpdate that needs a partial JSON update on a provider that did not override this method throws.","triggerScenarios":"Calling ExecuteUpdate that targets a nested scalar within a JSON column on a provider that does not override GenerateJsonPartialUpdateSetter (e.g. a minimal/custom provider, or SQLite for certain JSON operations). The base method unconditionally throws.","commonSituations":"Using JSON columns with a provider whose JSON-update support is incomplete; upgrading a provider that has not yet implemented JSON partial updates.","solutions":["Use a provider that overrides GenerateJsonPartialUpdateSetter (SQL Server/PostgreSQL with JSON support).","Update the entire JSON column (not a nested path) if the provider supports whole-column set, or fall back to SaveChanges.","Move the updatable scalar out of the JSON column into a regular column."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check provider capability before attempting partial JSON ExecuteUpdate.\nvar isSupported = ctx.Database.ProviderName switch\n{\n    \"Microsoft.EntityFrameworkCore.SqlServer\" => true,\n    _ => false\n};\nif (!isSupported)\n    throw new NotSupportedException(\"Provider does not support partial JSON ExecuteUpdate.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm the provider overrides GenerateJsonPartialUpdateSetter before using JSON partial updates.","Keep a compatibility matrix of providers vs JSON features.","Fall back to SaveChanges or whole-column set for unsupported providers."],"tags":["efcore","executeupdate","owned-json","provider","query-translation"],"backgroundTag":null,"analyzedSha":"3a2006ef569de08368d59db5e1468aa8f407e4f8","analyzedAt":"2026-08-11T23:42:04.146Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}