-
Notifications
You must be signed in to change notification settings - Fork 62
Update Request Builder filters out updates to null #3204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @carlonnheim, Thank you for raising this and also identifying the cause. I am able to reproduce the issue. I will create a backlog item for this and discuss within the team. Will get back to you with an update once we have a fix. |
Sounds great @deekshas8 , let me know if I can help with testing or similar. Thanks! |
Hi @deekshas8, Do you have an update on this issue on when it would be fixed. |
Hi @Udineshsap13, I'm working on it. The PR is open here. I can't give a date for when it will be released. Best, |
Hi @carlonnheim and @Udineshsap13 the fix has been merged to the main branch, but is not yet released. I'll keep you updated here. Best, |
Hi @carlonnheim and @Udineshsap13 we released version 2.13.0 with the fix included. Closing this issue, Florian |
Describe the bug
I have an oData v2 service exposing an entity with fields of String type. If I try to update one of those fields to become the value
null
they are discarded silently.To Reproduce
You need a service exposing an entity with a nullable property. Then do this
This results in no changed fields being identified and the update is silently discarded.
Expected behavior
A
PATCH
with the payload{"myNullableStringProperty":null}
should be sentScreenshots
N/A
Used Versions:
node -v
: v16.16.0npm -v
: 8.19.2Code Examples
I believe the root cause is in
packages/odata-v2/src/request-builder/update-request-builder.ts
. When looking for navigation properties and complex types it is checking thetypeof
being object, which filters out also scalar fields being set tonull
.Log file
N/A
Impact / Priority
We rely heavily on the cloud sdk for our integrations. The issue causes silent errors, i.e. the caller gets a successful response despite backend update not actually coming through. If we put these requests into batches they will be sent with an empty (
{}
) payload, which our backend services consider an error.Affected development phase: Release
Impact: Impaired
Timeline: Go-Live is in 3 months.
Additional context
Backend oData service is from SAP Business ByDesign
The text was updated successfully, but these errors were encountered: