Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete successful but data has not removed #125

Open
mrbhaskar opened this issue Jul 17, 2020 · 2 comments
Open

Delete successful but data has not removed #125

mrbhaskar opened this issue Jul 17, 2020 · 2 comments

Comments

@mrbhaskar
Copy link

mrbhaskar commented Jul 17, 2020

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 array

@huhu1030
Copy link

Same issue here..

@halilpolathalil
Copy link

halilpolathalil commented Aug 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants