Closed y-kalka closed 7 years ago
Bug
If I insert a document two times with collection.insert(). I get a document update conflict from Pouch.
let myDB; const state = { schemaJSON: { 'version': 0, 'type': 'object', 'properties': { 'name': { 'type': 'string', 'primary': true }, 'color': { 'type': 'string' } }, 'required': ['color'] } }; RxDB .create({ // assures a new db is created at each run name: 'heroesdb' + new Date().getTime(), adapter: 'idb' }) .then(db => myDB = db) .then(() => myDB.collection({ name: 'heroes', schema: state.schemaJSON })) .then(() => run()); function run() { myDB.heroes.insert({ name: 'Superman', color: 'red' }) .then(()=>{ myDB.heroes.insert({ name: 'Superman', color: 'red' }); }); }
Sorry my mistake have to use upsert
Case
Bug
Issue
If I insert a document two times with collection.insert(). I get a document update conflict from Pouch.
Info
Code