Skip to content

ArgumentNullException in CreateJsonShapers when querying entities with nested OwnsMany inside ToJson() in EF Core 10Β #37417

@hopkienne

Description

@hopkienne

After upgrading from EF Core 9 to EF Core 10.0.0-rc.2, queries involving entities with nested OwnsMany collections mapped with ToJson() throw an ArgumentNullException during query compilation.

System.ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.set_Item(TKey key, TValue value)
at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.CreateJsonShapers(...)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions