Skip to content
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

ODataService.request: removing all @odata metadata fields was a wrong decision #60

Closed
buchatsky opened this issue Apr 28, 2022 · 4 comments · Fixed by #77
Closed

ODataService.request: removing all @odata metadata fields was a wrong decision #60

buchatsky opened this issue Apr 28, 2022 · 4 comments · Fixed by #77

Comments

@buchatsky
Copy link
Collaborator

buchatsky commented Apr 28, 2022

First, if it is done, is should be done recursively, not only on single entity, but also on arrays.
And second, it should not be done at all, because e.g. @odata.etag is required for optimistic concurrency when RowVersion field is not included in $select clause or is not present in DTO model.
Presence of odata metadata in response should be controlled by "metadata" param of "accept" http header. It may be a param in ODataService constructor

@AimTune
Copy link
Contributor

AimTune commented Mar 15, 2024

Recent changes did not take effect in the npm package. You can check out the example below.

image

image

@buchatsky
Copy link
Collaborator Author

It probably fixed the contradiction between github and npmjs sources, but not the issue with functionality itself.
pr#82 fixes it (preserves odata metadata in the resulting object)

@buchatsky buchatsky reopened this Jun 21, 2024
@AimTune
Copy link
Contributor

AimTune commented Jun 24, 2024

It probably fixed the contradiction between github and npmjs sources, but not the issue with functionality itself. pr#82 fixes it (preserves odata metadata in the resulting object)

The npm package is not updated because the npm token is not defined under Github Actions Secrets.

@buchatsky
Copy link
Collaborator Author

@AimTune That was not the point of this issue. The point was to remove back the code that cleared metadata and leave it as it was before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants