From a50810e1eef1fe978154630e9d21f28794ff8a48 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 01:51:09 +0000 Subject: [PATCH 1/3] Sync to EF 11.0.0-preview.3.26160.112 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Directory.Packages.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index ccc9085d4..4ee01973c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,8 +1,8 @@ - 11.0.0-preview.3.26155.101 - 11.0.0-preview.3.26155.101 - 11.0.0-preview.3.26155.101 + 11.0.0-preview.3.26160.112 + 11.0.0-preview.3.26160.112 + 11.0.0-preview.3.26160.112 10.0.0 From 70abe94600a681aee7ccb9295e100d34d079a72b Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Wed, 11 Mar 2026 07:10:16 +0200 Subject: [PATCH 2/3] From 4e2c1bef7831090210ae6450c82828d641a0f77a Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Wed, 11 Mar 2026 10:54:05 +0200 Subject: [PATCH 3/3] Add structural JSON type mappings to StoreTypeMappings EF Core PR #37864 changed GetContainerColumnType() to return the default JSON store type (e.g. 'jsonb') for finalized models instead of null. This causes RelationalModel.CreateContainerColumn to call FindMapping(typeof(JsonTypePlaceholder), 'jsonb') rather than FindMapping(typeof(JsonTypePlaceholder), null). The previous call resolved through ClrTypeMappings and correctly returned NpgsqlStructuralJsonTypeMapping. The new call resolves through StoreTypeMappings, which didn't include the structural JSON mappings, causing it to fall through and create a wrong NpgsqlJsonTypeMapping instead. Fix by adding _jsonbOwned and _jsonOwned to the StoreTypeMappings for 'jsonb' and 'json' respectively. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/EFCore.PG/Storage/Internal/NpgsqlTypeMappingSource.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EFCore.PG/Storage/Internal/NpgsqlTypeMappingSource.cs b/src/EFCore.PG/Storage/Internal/NpgsqlTypeMappingSource.cs index 4908b1ee8..2d9bf1df8 100644 --- a/src/EFCore.PG/Storage/Internal/NpgsqlTypeMappingSource.cs +++ b/src/EFCore.PG/Storage/Internal/NpgsqlTypeMappingSource.cs @@ -238,8 +238,8 @@ public NpgsqlTypeMappingSource( { "decimal", [_numeric, _bigInteger, _numericAsFloat, _numericAsDouble] }, { "money", [_money] }, { "text", [_text] }, - { "jsonb", [_jsonbString, _jsonbDocument, _jsonbElement] }, - { "json", [_jsonString, _jsonDocument, _jsonElement] }, + { "jsonb", [_jsonbString, _jsonbDocument, _jsonbElement, _jsonbOwned] }, + { "json", [_jsonString, _jsonDocument, _jsonElement, _jsonOwned] }, { "jsonpath", [_jsonpath] }, { "xml", [_xml] }, { "citext", [_citext] },