The current behavior to return true on a dbCollection.updateis making some important tests of ours fail. To give an example:
const numUpdates = MpIndex.update({ _id: mpIndexDoc }, { $addToSet: { cardsIdArray: cardId } }, { tx: true, instant: true }); if (numUpdates === 0) { throw new Error(Something is wrong - No doc was being updated - mpIndex _id: ${mpIndexDoc} / ${cardId}); }
Now we're receiving true instead of a number. It's important for us to identify where our functions are trying to update a doc with a value that already exists as that is a logical error.
The current behavior to return
trueon adbCollection.updateis making some important tests of ours fail. To give an example:const numUpdates = MpIndex.update({ _id: mpIndexDoc }, { $addToSet: { cardsIdArray: cardId } }, { tx: true, instant: true }); if (numUpdates === 0) { throw new Error(Something is wrong - No doc was being updated - mpIndex _id: ${mpIndexDoc} / ${cardId}); }Now we're receiving
trueinstead of a number. It's important for us to identify where our functions are trying to update a doc with a value that already exists as that is a logical error.