Skip to content

Commit

Permalink
Fix error around mapping Nullable<JsonElement>
Browse files Browse the repository at this point in the history
Fixes #2977
  • Loading branch information
roji committed Nov 6, 2024
1 parent eca0184 commit c607c01
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void ProcessPropertyAdded(IConventionPropertyBuilder propertyBuilder, ICo
{
var property = propertyBuilder.Metadata;

if (property.ClrType == typeof(JsonElement) && property.GetColumnType() is null)
if (property.ClrType.UnwrapNullableType() == typeof(JsonElement) && property.GetColumnType() is null)
{
property.SetTypeMapping(_jsonTypeMapping ??= new NpgsqlJsonTypeMapping("jsonb", typeof(JsonElement)));
}
Expand Down

0 comments on commit c607c01

Please sign in to comment.