openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

[1.30] v2.ODataModel submits empty updates

Open themasch opened this issue 11 years ago • 3 comments

This isn't a real problem but a small inconvenience. If you call setProperty("a", x), and the old value of "a" is x, the ODataModel creates an empty update request. Since 1.30 OData update requests only contain the changed values. Since nothing changed when you set the same value again, the payload is empty except the metadata.

I'd suggest to omit these request ;)

Small example: https://jsbin.com/ruzubisema/5/edit?html,output

themasch avatar Sep 21 '15 12:09 themasch

Hello themasch,

seems like a good idea. I contacted the developers to give you feedback on this one. I would say if you feel confident enough you can also create a pull request for this optimization and we will review it.

Internal Incident ID: 1580102701

Kind Regards,

Michael

Michadelic avatar Sep 22 '15 15:09 Michadelic

I looked at the code before posting that, but couldn't find a quick way of fixing it. Might have another look of it this weekend ;)

themasch avatar Sep 22 '15 15:09 themasch

Hello themasch, the issue is fixed. The fix will be available with the next patch/release. We do not track changes in this case anymore and so no request will be sent. BR, Jan

loginger avatar Oct 14 '15 08:10 loginger