You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yoo can delte with below code: this.relDb.rel.find("posts", docId).then((doc) => { this.relDb.rel.del("posts",, doc["posts"][0]).then(result => { console.log(result)//{deleted: true} is wirtten })
the problem is rel.find("posts", docId) return array result. But rel.del is expected a document. So the delete result is returned as {deleted: true} but the document not removed. If we give a document to rel.del method, the problem is solved.
Hello @nolanlawson @jlami
first of all this a copy of #79
getting success message on
delete(id) { this.baseDB.rel.find('post', id) .then( post => { console.log('to be deleted', post) return this.baseDB.rel.del('post', { id: post.id, rev: post.rev }) }) .then( success => { console.log('deleted', success) <== {deleted: true} } ) .catch( err => console.log(err) ) }
{deleted: true}
but data is still present in
post
arrayThe text was updated successfully, but these errors were encountered: