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

Fixing error when connection does not exist #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dastra
Copy link

@dastra dastra commented Jul 31, 2013

We had an error with mongo v2.4.5 on debian squeeze with node.js v0.10.10.

When createCollection was called, and the collection did not exist, we were getting a "collection already exists error". Strange.

The changes:

  • Ensure that if there is an error returned on collection creation, that error is thrown
  • Creates the database connection with strict = false
  • Uses collection instead of createCollection, as this does not cause the error

dan added 5 commits July 30, 2013 16:06
…ongo cannot connect, db.collection instead of db.createCollection
This reverts commit 883983a.
This reverts commit f708331.
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 this pull request may close these issues.

1 participant