ODataResourceDeserializerHelpers
issues with ComplexTypes that have EdmModel navigation properties
#2737
Labels
ODataResourceDeserializerHelpers
issues with ComplexTypes that have EdmModel navigation properties
#2737
Assemblies affected
ASP.NET Core OData 7.6.1
Describe the Problem
ODataResourceDeserializerHelpers.GenerateNestedReadContext()
does not account for ComplexTypes (types that aren't mapped to the model) that contain properties whose types DO map to the model. At this point,edmProperty
will not be null, and theedmProperty.PropertyKind
will be Navigation, BUTreadContext.Path.NavigationSource
will be null, leading to aNullReferenceException
on the next line.(As an aside, the equality checks on lines 58 & 80 should be replaced with the "is" keyword, they evaluate faster. That should really be done throughout the codebase at some point.)
Reproduce steps
List<NotDatabaseObject>
as a parameter.NotDatabaseObject
s in the payload.Data Model
Expected behavior
I expect the request to be processed like it was in previous versions and for the service to produce a response.
Screenshots
The text was updated successfully, but these errors were encountered: