openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

merge update problem with mockserver

Open Myge91 opened this issue 11 years ago • 8 comments

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

Myge91 avatar Jun 12 '15 08:06 Myge91

Tracked internally as 1570477559.

christianegoebels avatar Jun 17 '15 13:06 christianegoebels

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

DMihaylova avatar Dec 02 '16 07:12 DMihaylova

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

DerGuteWolf avatar Dec 02 '16 08:12 DerGuteWolf

OK, I'm reopening this issue and the internal one :)

DMihaylova avatar Dec 02 '16 08:12 DMihaylova

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

idobas avatar Feb 28 '17 09:02 idobas

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

DerGuteWolf avatar Feb 28 '17 09:02 DerGuteWolf

"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 avatar Feb 28 '17 09:02 ThomasChadzelek

@ThomasChadzelek Right. @idobas You should at least open it again, fix the documentation and add a feature request label.

DerGuteWolf avatar Feb 28 '17 09:02 DerGuteWolf