Closed tejzpr closed 7 years ago
I have updated the code to address the issue you raised. 👍
@watson what do you think?
@watson Can we merge this code? This fix will allow running multiple mongodown's on a single mongodb database without any issues.
@tejzpr published in v1.2.0
🎉
@davidguttman 👍
I would also like this feature =)
Looking at this change it seems like it would be possible to get into trouble with more than one level instance.
collection
is defined outside the scope of the db instance, and is overwritten on each instantiation. I think this could lead to a confusing bug if you instantiate two dbs with different collection names.Here's a PR that was (in addition to something else) trying to configure the collection name: https://github.com/watson/mongodown/pull/3/files#diff-168726dbe96b3ce427e7fedce31bb0bcR54