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

Readme file info about find/save and find/del pattern inaccurate #34

Closed
egoossens opened this issue Aug 20, 2015 · 1 comment · Fixed by #35
Closed

Readme file info about find/save and find/del pattern inaccurate #34

egoossens opened this issue Aug 20, 2015 · 1 comment · Fixed by #35

Comments

@egoossens
Copy link
Contributor

Forgive me if I missed something, but it seems I can't reproduce the find/save and find/del patterns described in the Readme file.
The find method returns a collection object even when specifying an id. Shouldn't the first item be extracted before it can be fed to the del/save method?

db.rel.find('post', 1).then(function (post) {
  return db.rel.del('post', post.posts[0]).catch(function (err) {
    if (err.code === 409) { // conflict
      // handle the conflict
    } else {
      throw err; // some other error
    }
  });
});
@nolanlawson
Copy link
Member

You're right; that's a typo. :) Can you open a PR on the readme?

egoossens added a commit to egoossens/relational-pouch that referenced this issue Aug 20, 2015
Correct typos in find/save and find/del patterns description and fix pouchdb-community#34.
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

Successfully merging a pull request may close this issue.

2 participants