PouchDB put call getting 409: Document update conflict
<p>stack:nodejs, backbone.js v1.3.3, underscore.js v1.8.3, JQuery v2.2.4, cordova v6.1.1, <a href="https://pouchdb.com/download.html" rel="nofollow">https://pouchdb.com/download.html</a> v6.0.5, <a href="https://github.com/jo/backbone-pouch" rel="nofollow">https://github.com/jo/backbone-pouch</a> v?, <a href="https://github.com/apache/cordova-plugin-device" rel="nofollow">https://github.com/apache/cordova-plugin-device</a></p>

<p>I've polled the todos-db for the record using the _id and updated the _rev attribute, but I can't find my way out of these conflicts, so all help appreciated:</p>

<p>In my TodoModel, I'm doing:</p>

<pre><code>    return Backbone.Model.extend( {

        idAttribute:    "_id",
        db:         new PouchDB( "todos-db" ),
        sync:       this.BackbonePouch.sync( {
                    db: this.db,
                    fetch: "query",
                    options: {
                        query: {
                            include_docs: true
                        }
                    }
                } ),

        initialize:     function(){

                    this.listenTo( Backbone, "updateRec", function( model ){
                        this.updateRec( model );
                    } );
                },

        updateRec:  function( revRec ){

                    var self = this;
                    console.log( "revRec:", revRec );
                    this.db.get( revRec._id, { conflicts: true } ).then( function( doc ){
                        console.log( "doc:", doc ); // doc has no conflicts
                        revRec._rev = doc._rev;
                        return self.db.put( revRec );
                    } ).then( function( result ){
                        console.log( "updateRec result:", result ); 
                        return result;
                    } ).catch( function( err ){
                        // TODO: the above 'put' is throwing multiple confict errors, yet the db is updating after 7 tries
                        console.log( err ); 
                    } );

                }
    } );

});
</code></pre>

<p>In the log, revRec gives me:</p>

<pre><code>_id:"2016-09-27T16:45:34.297Z"
_rev:"5-b554a2b4989efedac3ca3ccb679aa42e"
completed:false
delegatedTo:"Jen"
due:"Friday"
priority:"A"
project:"home"
task:"MBath concept"
</code></pre>

<p>The 'put' result gives me:</p>

<pre><code>{ok: true, id: "2016-09-27T16:45:34.297Z", rev: "6-c6647848d965c35c7ac4f968cac7a91b"}
</code></pre>

<p>and the catch err is:</p>

<pre><code>CustomPouchError {status: 409, name: "conflict", message: "Document update conflict", error: true}
</code></pre>