You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In operations.ts the versionKey is completely removed from the document to save:
// @ts-expect-error this is fine 🐶🔥
if (contextModel.schema.options.versionKey) {
// @ts-expect-error this is fine 🐶🔥
delete req.body[contextModel.schema.options.versionKey];
}
Looks like this breaks the mechanism of optimisticConcurrency . It was originall introduced by @florianholzapfel here: 53c44c4. Ok, thirteen years ago, but do you perhaps remember the reason for introducing this behaviour?
BTW: I checked out the latest version and commented the lines in create/modifyObject, made a build and all tests are still running. May be some refactoring of populate and depopulate in the meantime made the original problem obsolete?
2nd annotation: Should we modify the test command to something like "test": "rm -rf dist && npm run build && run-s test:*" to always test on a fresh distro?
The text was updated successfully, but these errors were encountered:
Hi guys, just a simple question:
In operations.ts the versionKey is completely removed from the document to save:
Looks like this breaks the mechanism of
optimisticConcurrency
. It was originall introduced by @florianholzapfel here: 53c44c4. Ok, thirteen years ago, but do you perhaps remember the reason for introducing this behaviour?BTW: I checked out the latest version and commented the lines in create/modifyObject, made a build and all tests are still running. May be some refactoring of populate and depopulate in the meantime made the original problem obsolete?
2nd annotation: Should we modify the test command to something like
"test": "rm -rf dist && npm run build && run-s test:*"
to always test on a fresh distro?The text was updated successfully, but these errors were encountered: