-
Notifications
You must be signed in to change notification settings - Fork 55
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
TypeError: Cannot call method 'collection' of undefined. #252
Comments
Sorry that it's so hard to bootstrap Model all by itself. You can take a look at the Mongo adapter tests to see one way to get the adapter set up and working: https://github.com/geddy/model/blob/master/test/integration/adapters/mongo/index.js#L16 |
@mde thank u very much,i should see it,i will comment it later! |
hello @mde !
it was worked! but,was it a bug?or was my code's error? |
I think you were missing the step for actually creating and connecting the adapter in your previous code. I'm going to go ahead and close this issue -- if you continue to have problems, please feel free to reopen it! |
when I run the code,it throw
throw code was:
the _db was null
I debug model's code,it didn't execute connect function in adapters/mongo/index.js
and my mongodb module version is 2.0.18,and model module version is 6.0.1.
How can i fix it?
Thx!
The text was updated successfully, but these errors were encountered: