on 2021 Nov 22 2:09 PM
Request clarification before answering.
why you are doing that? what is the real problem?
if you delete it, how can it be json format???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Firstly you can see my odata picture then;
If you try this like deep insert you will get error.Because deep insert works without "results" tags.
var oEntry = oData.results[0];
var oModel = that.getView().getModel();
oModel.create("/ScarrSet", oEntry, {
method: "POST",
success: function(oData, oResponse) {
console.log("success");
},
error: function(oError, oResponse) {
console.log("error");
}
});
But if you remove "results" tags its work fine
var oEntry = oData.results[0];
oEntry.ScarrToSpfli = oEntry.ScarrToSpfli.results;
oEntry.ScarrToSflight = oEntry.ScarrToSflight.results;
var oModel = that.getView().getModel();
oModel.create("/ScarrSet", oEntry, {
method: "POST",
success: function(oData, oResponse) {
console.log("success");
},
error: function(oError, oResponse) {
console.log("error");
}
});
I know i can change data before create operation.I dont prefer this. I just want to remove all "result" tags in the returned odata json.
In addition, it provides convenience in data binding.
You can use it as ("test>/data") instead of ("test>/data/results").
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.