merge update problem with mockserver
Hey there,
I have found an issue with the mockserver. Short description: merge update of some of the properties of a complex type to the mock server removes non-updated properties of the complex type, see log output of a read before/after the change
I want to update 2 fields:
var oData = {
"Status" : {
"IsAdditionalNew" : false,
"IsAdditionalConfirmed" : true
}
};
In the Status the model has a third property named "isConfirmed". After I updated the model with the oData the isConfirmed field disappeared
Before the update the console.log output is: {"__metadata":{"type":"MOCKSERVER_BUG.AssignmentStatus"},"IsConfirmed":false,"IsAdditionalNew":false,"IsAdditionalConfirmed":false}
after the update the console.log output is: {"IsAdditionalNew":false,"IsAdditionalConfirmed":true}
Here is a short example of the bug: http://plnkr.co/edit/wHq5sw3GvC3UAiarB8lC?p=preview
If you need some more information let me know.
Regards
Jan
Tracked internally as 1570477559.
Hi @Myge91 ,
Sorry for the late response. The colleagues said that it's not reproducible anymore so I guess it's fixed.
Therefore I'm closing the issue. Feel free to reopen it if needed.
Thanks and Kind Regards, Diana, openui5 dispatcher
Hi DMihaylova ,
sorry, but the bug is still there, see the console output of the referenced plnkr !
Please recheck and reopen the bug!
Thanks, DerGuteWolf
OK, I'm reopening this issue and the internal one :)
Hi Diana,
The mock server currently does not support updating complex fields (like the Status field). For example - say we have an entity like - { Status: { a: "a", b: "b" } OtherField: "other" }
if we only want to update the Status.a value, I need to send an update for b as well, with its current value. Since the requested behavior is not supported, I will close this issue. Please contact me is you have any questions.
Best Regards, Ido
Hi Ido,
could you at least document this restriction at https://openui5.hana.ondemand.com/#docs/guide/3459c372aaaa4c31ab87bb0e174adcc3.html ? cause this is very surprising to a developer!
Regards, Wolfgang
"Since the requested behavior is not supported, I will close this issue."? Isn't the issue about the fact that the requested behavior is not supported? I do not assume people will change their productive code and introduce workarounds into the way they talk with a real backend system just to make it also work with a mock server.
@ThomasChadzelek Right. @idobas You should at least open it again, fix the documentation and add a feature request label.