Problem with cuba.rest.optimisticLockingEnabled

Hello,

It looks like this fix may have introduced an issue for extended entities. If I try to update an extended entity through REST I get an error (see the stack traceStack trace.txt).

Despite the error, the entity is updated, however, the UI sometimes hangs as a result.

I confirmed that delete works as expected.

I confirmed that I can successfully update non-extended entities…

I tested this with the property cuba.rest.optimisticLockingEnabled set to true and I see the same result.

I’m developing on version 6.10.6 and using SQL Server.

Thank you.

By default, cuba.rest.optimisticLockingEnabled is false.
With cuba.rest.optimisticLockingEnabled = true REST API uses optimistic locking via version field and optimistic lock error is valid error.

Could you provide a sample project and sample JSON that reproduce the problem?