Closed jorfermo closed 7 years ago
I would double-check your code that you are returning the new document inside of the delta function – pouchdb-upsert
should definitely support this case.
It's weird cause after I manually added those properties to the object in the database the upsert worked fine without touching anything in my code
Please reopen if you can provide a test case to reproduce; I'm closing old issues. Thanks!
For instance this object:
{ _id: 1, name: 'a', }
upserted with this object:
{ _id: 1, name: 'aa', surname: 'b' }
result:
{ _id: 1, name: 'aa', }
and it ignores surname
Is this the expected behavior? How to upsert with new properties?