Closed fasiha closed 7 years ago
I think you might be misunderstanding the docs -- upsert
returns an object telling whether the document was updated or not, plus the id and revision, in the format:
{updated: true, rev: "2-b5e14bb0396dc9b7d34db8867156a6c2", id: "documentID"}
Of course, the document in the database will have _id and _rev and whatever other fields. But that's not what is actually returned by upsert
.
Aha! Understood!!!
The docs assert that
upsert
returns{_id, _rev}
(and potentially other things). I see that currently it returnsid
andrev
, without underscores. I can submit PR to correct this if indeed the docs are wrong? Thank youuu!