-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
When the response from the server is nested, and you're using submit = true, the _mergeUpdateForSubmit function triggers on a successful request.
When this function reads the JSON the server has answered with, it is only accessing first-level tables, therefore it isn't retrieving errors server is returning in child tables, deeming operations as successful.
Lines 5525 to 5551 in 319202b
| var dataSetJsonObject = jsonObject[this._dataSetName]; | |
| if (dataSetJsonObject[this._dataSetName]) | |
| dataSetJsonObject = dataSetJsonObject[this._dataSetName]; | |
| var beforeJsonObject = dataSetJsonObject["prods:before"]; | |
| for (var buf in this._buffers) { | |
| var tableRef = this._buffers[buf]; | |
| var tableJsonObject = dataSetJsonObject[tableRef._name]; | |
| if (tableJsonObject instanceof Array) { | |
| for (var i = 0; i < tableJsonObject.length; i++) { | |
| var recordId = tableJsonObject[i]["prods:clientId"]; | |
| if (!recordId) { | |
| throw new Error(msg.getMsgText("jsdoMSG035", "_mergeUpdateForSubmit()")); | |
| } | |
| // Determine if error string (get prods_id before _mergeUpdateRecord() is called, | |
| // since it removes all prods properties) | |
| errorString = undefined; | |
| if (tableJsonObject[i]["prods:hasErrors"]) { | |
| var prods_id = tableJsonObject[i]["prods:id"]; | |
| errorString = | |
| this._getErrorStringFromJsonObject(dataSetJsonObject, tableRef, prods_id); | |
| } |
Here, dataSetJsonObject holds a NESTED dataSet, so only one table is present, rest are nested inside:
Line 5534 in 319202b
| var tableJsonObject = dataSetJsonObject[tableRef._name]; |
Only table is gonna see error processing is the initial table, while errors may occur on child tables.
Is there any workaround for this? useRelationships does nothing in this scenario.
Metadata
Metadata
Assignees
Labels
No labels