The mutation broke our app here, where we created the keyFields object, inserted it as a document, and later used it as a selector, intending to find the same document. Since the transaction package set keyFields.transaction_id and the transaction ID of the document in the database had been changed by the intervening update, the selector didn't match. One could argue that our code is dodgy, but I think there's a stronger general principle that API calls should not mutate their arguments unless documented as doing so.
Note: I tested that in combination with #67 (ignoring the other four test failures), the new test fails on the old code and passes on the new code.
The mutation broke our app here, where we created the
keyFields
object, inserted it as a document, and later used it as a selector, intending to find the same document. Since the transaction package setkeyFields.transaction_id
and the transaction ID of the document in the database had been changed by the intervening update, the selector didn't match. One could argue that our code is dodgy, but I think there's a stronger general principle that API calls should not mutate their arguments unless documented as doing so.Note: I tested that in combination with #67 (ignoring the other four test failures), the new test fails on the old code and passes on the new code.