when I use mongoose updateOne to update a document with its id and additional query for optimistic locking as below
Model.updateOne({_id,...additionalQueryForOptimisticLock},updates)
if there is a conflict write, it returns as expectation;:
{
acknowledged: true,
modifiedCount: 0,
upsertedId: null,
upsertedCount: 0,
matchedCount: 0
}
but I don't expect that it still trigger the post update hook, is it a bug? thanks!