-
Notifications
You must be signed in to change notification settings - Fork 42
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
Mongoose new Model() #11
Comments
After some digging I end up doing var stuff = StuffManager.build(db,"Stuff"); Seems to me that the mongoose oop model is somewhat messy. |
Yeah, the externs are still hot :)
There still seem to be some issues, though (trying to |
The parameters not being optional is not the issue, the issue is that the Document (super) constructor is not being called as it is missing in js.npm.macro.Model. I would put it there myself, but the problem is it does not work anyway, because you have to call the constructor on which moongoose.model() returns, which is Manager. |
Yeah, right... |
maybe |
or |
I vote for construct ;). Thank a lot |
|
Thanks! |
I am aware new Mongoose externs are still hot :), but maybe this is a simple fix. I am not able to create a Document out of a model with just calling the constructor. (not using create)
var stuff = new Stuff(); //non persisted doc
Thanks for your work!
The text was updated successfully, but these errors were encountered: