progress / JSDO

Client side TypeScript library to access Progress® Data Object Services
Other
23 stars 27 forks source link

Using Submit operations with multiple tables that are nested isn't retrieving errors #281

Open W1nstar opened 4 years ago

W1nstar commented 4 years ago

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.

https://github.com/progress/JSDO/blob/319202b27d5486ae5023d0351e5a4af4d68f3230/src/progress.js#L5525-L5551

Here, dataSetJsonObject holds a NESTED dataSet, so only one table is present, rest are nested inside:

https://github.com/progress/JSDO/blob/319202b27d5486ae5023d0351e5a4af4d68f3230/src/progress.js#L5534

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.