Skip to content

Throw when materializating JSON nulls to non-nullable .NET properties #36587

@roji

Description

@roji

Our current behavior - at least for complex structural types - is to return default. For example, when materiailzing a required value complex type (JSON or table splitting), if the database contains a JSON null we return the default for the struct. Note that this is different from when the property is missing (in that case we indeed should return default as part of the data evolution story).

  • Align across both table splitting and JSON.
  • Check what the current behavior is for required table splitting complex types. If we're changing the behavior for those, that's a (very minor) breaking change, since those were supported before EF 10.
  • Ideally align Cosmos as well to the behavior.

As part of this, also address minor unaddressed review comments from #36557.

/cc @AndriySvyryd @cincuranet

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions