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
When I pass a doc to put, it does not mutate the doc, and I can use it again expecting it to be the same. When I pass a doc to validatingPut, it mutates the doc by adding a _revisions property.
I'd like to be able to pass an doc to validatingPut without it mutating the doc.
EDIT: Same goes for validatingBulkDocs and others.
The text was updated successfully, but these errors were encountered:
jemc
changed the title
Mutates the given doc with a _revisions property.
Mutates the given doc by adding a _revisions property.
Jul 4, 2016
Thanks for reporting. Yes, it should copy the document before modifying it. (The modification itself is in line which CouchDB's behaviour, but it still shouldn't modify input.)
If anyone wants to work on this (it should be a relatively simple matter of modifying/adding an extend() call), keep an eye on pouchdb/pouchdb-server#143 ; this repository is probably going to be deprecated in favour of that one soon.
When I pass a doc to
put
, it does not mutate the doc, and I can use it again expecting it to be the same. When I pass a doc tovalidatingPut
, it mutates the doc by adding a_revisions
property.I'd like to be able to pass an doc to
validatingPut
without it mutating the doc.EDIT: Same goes for
validatingBulkDocs
and others.The text was updated successfully, but these errors were encountered: