You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My primary question is: does Microsoft.AspNetCore.OData support the OData 4.01 spec, specifically bulk update operations?
When the client sends a bulk update request with the OData-Version header set to 4.01 the library throws the exception An OData version of 4.01 was specified and the maximum supported OData version is 4.0., then continues to the controller action with the DeltaSet<T> parameter as null. If I send an identical request from postman with the header set to 4.0 instead, the library seemingly has no issue and populates the DeltaSet<T> as expected (for a simple model without related entities or links).
Reproduce steps
I implemented Sample Request 1 from the OData Client Bulk Update Operations examples on my client.
And implemented an endpoint on my server to "patch a collection of entities" from this Microsoft.AspNetCore.OData tutorial.
Note: I modified the client example to work with the Shape model from the server example.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Exception:
Microsoft.OData.ODataException
HResult=0x80131509
Message=An OData version of 4.01 was specified and the maximum supported OData version is 4.0.
Source=Microsoft.OData.Core
StackTrace:
at Microsoft.OData.ODataMessageReader..ctor(IODataRequestMessage requestMessage, ODataMessageReaderSettings settings, IEdmModel model)
The text was updated successfully, but these errors were encountered:
AlpineJBoehnen
changed the title
An OData version of 4.01 was specified and the maximum supported OData version is 4.0
OData version error when requesting 4.01 bulk update
Jun 14, 2024
Assemblies affected
Microsoft.AspNetCore.OData 8.2.5
Microsoft.OData.Client 7.21.3
Describe the bug
Related issue: OData/odata.net#3004
My primary question is: does Microsoft.AspNetCore.OData support the OData 4.01 spec, specifically bulk update operations?
When the client sends a bulk update request with the OData-Version header set to 4.01 the library throws the exception
An OData version of 4.01 was specified and the maximum supported OData version is 4.0.
, then continues to the controller action with theDeltaSet<T>
parameter as null. If I send an identical request from postman with the header set to 4.0 instead, the library seemingly has no issue and populates theDeltaSet<T>
as expected (for a simple model without related entities or links).Reproduce steps
I implemented Sample Request 1 from the OData Client Bulk Update Operations examples on my client.
And implemented an endpoint on my server to "patch a collection of entities" from this Microsoft.AspNetCore.OData tutorial.
Note: I modified the client example to work with the Shape model from the server example.
Client code:
Server code:
Data Model
EDM (CSDL) Model
Request/Response
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Exception:
The text was updated successfully, but these errors were encountered: