Skip to content

Issue with getErrors using mergeMode: progress.data.JSDO.MODE_MERGE #273

@W1nstar

Description

@W1nstar

Hello,

I've set up my app to use mergeMode: progress.data.JSDO.MODE_MERGE on read operations so I can deploy a successful pagination system.

It's been working great, but whenever there's an an unsuccessful validation on an update operation, the first time jsdo.getErrors() always returns undefined as error message. The response found inside the request is correctly giving the error, and there's nothing wrong that I've been able to find in the backend.

Also, this doesn't happen without the mergeMode enabled on read operations. I've been trying to track the error throughout the JSDO but it's proven too difficult without full knowledge of it.

What I was able to find is that the _undoUpdate function is called, and is copying a record with _errorString property set to null over a record with the correct _errorString property, wich is then returned. When the assign function is called, even previous to it's first line of code (this._saveBeforeImageUpdate()) or communicating to the server, this.data already has a copy of every record read and stored from the read operation, with an _errorString property set to undefined. I haven't been able to find why or how is this undefined _errorString property on the data collection already.

Second time the assign is called, different methods are called and I lose the thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions