> I’m unsure how exactly new_edits: false works if no updated “_revisions” object is provided. > How does it know which parent node to connect the new revision to?
As mentioned on the PouchDB bug, you need a _revisions object, but it only needs to contain the revision you want to connect to (the parent) and not the entire tree https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-utils/src/parseDoc.js#L79 parses the incoming document and https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-utils/src/updateDoc.js#L33 merges those trees together. Looking at the merge code ( https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-merge/src/merge.js) and tests may help you figure out whats happening On 20 October 2016 at 14:52, Jonas Weber <[email protected]> wrote: > Hi Robert, > > it's documented a little bit better here: http://docs.couchdb.org/en/2. > 0.0/replication/protocol.html#upload-batch-of-changed-documents In > essence, you have to supply the _revisions array always. > > Are you sure you're doing the right thing when updating documents that > often? AFAIK CouchDB is not optimized for your use case (the limit of 1024 > is probably arbitrarily chosen, but it makes sense to have a limit). For > example, it might improve your experience greatly if you just insert a new > document instead of updating an existing one? If you're able to tell us > what your use case is you might get information from the experts on this > mailing list on how to use CouchDB in the best possible way. > > Best regards, > Jonas > > Am 20. Oktober 2016 um 14:35:39 +02:00, hat Robert Nagy < > [email protected]> geschrieben: > > I’m unsure how exactly new_edits: false works if no updated “_revisions” > object is provided. How does it know which parent node to connect the new > revision to? > > Basically I would like to have a way to use just new_edits: false, but > instead of having to get, update and send the entire revision history, just > send the parent revision. > Best Regards, > > Robert Nagy > > >
