Open newclaus opened 4 years ago
The same problem has occurred during deserialization of complex types
@newclaus Did you explicitly specify nullable true for the collection property? As per spec you cannot asume nullable =true by default As per spec: If no value is specified for a collection-valued property, the client cannot assume any default value http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html#_Toc26368806
@Sreejithpin, yes, I did. Furthermore, the property in client EDM model has Type
Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsCollectionTypeExpression
and debugger displays value like
{[Collection([ItemModel Nullable=True]) Nullable=True]}
OData Web Api Client throws exception in case of passing null value to property of ICollection during executing action. Although my EdmModel supports null-value
Assemblies affected
*Which assemblies and versions are known to be affected e.g. Microsoft.OData.Client 7.6.2
Reproduce steps
Call service action and pass object with null-value property
Expected result
Null values allowed
Actual result
Exception is thrown
Additional detail
Node Name="Collection" has no attribute 'Nullable', so it is nullable by default
`
...