Skip to content

oDataModel v2 update (PUT) fails in batch #1703

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

Closed
pdominique opened this issue Sep 27, 2017 · 5 comments
Closed

oDataModel v2 update (PUT) fails in batch #1703

pdominique opened this issue Sep 27, 2017 · 5 comments

Comments

@pdominique
Copy link

Hi,

I'm using SAP UI5 1.44.11 and I have to disable batch mode to update my entities otherwise I get the following error:

The Data Services Request could not be understood due to malformed syntax

I replayed the batch request in the GW client and I noticed that the PUT keyword was not in upper case (i.e Put instead of PUT). When I modify the keyword manually in the GW client then the request works as expected.

@pdominique
Copy link
Author

I was going to disable batch globally in the manifest for my model when I noticed something:

"": {
	"dataSource": "mainService",
	"preload": true,
	"settings": {
			"defaultBindingMode": "TwoWay",
			"defaultUpdateMethod": "Put"
	}
},

I changed Put to PUT in the manifest and now everything works just fine. Maybe a check should be added somewhere.

@szebenyib
Copy link

Now this was really a bad situation. Many thanks for reporting this incident and the solution as well - we experienced the exact same issue. This should definitely be checked in the manifest.json and corrected automatically by the framework to uppercase PUT in requests.

@boghyon
Copy link
Contributor

boghyon commented Jan 31, 2025

This is a known issue and should be improved. See #4201

@i556484 i556484 added the bug label Jan 31, 2025
@i556484 i556484 reopened this Jan 31, 2025
@i556484
Copy link
Member

i556484 commented Jan 31, 2025

Hello @pdominique, @szebenyib,
Thank you for sharing this finding. I've created an internal incident DINC0398068. The status of the issue will be updated here in GitHub.

@SvBe
Copy link
Member

SvBe commented Feb 4, 2025

Hello,
To avoid spelling issue we deprecated the old sap.ui.model.odata.UpdateMethod enum keys Put and Merge in the current UI5 1.x codeline and replaced them by PUT and MERGE.
Additionally to that we map the deprecated enum keys Put and Merge in the sap.ui.model.odata.v2.ODataModel constructor to the corresponding values PUT and MERGE.
Best Regards,
Sven

@SvBe SvBe added fixed and removed in progress labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants