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

Cool idea, but how do I customize the models? #1

Open
pvencill opened this issue Jan 3, 2013 · 2 comments
Open

Cool idea, but how do I customize the models? #1

pvencill opened this issue Jan 3, 2013 · 2 comments

Comments

@pvencill
Copy link

pvencill commented Jan 3, 2013

So, I really like your idea of having these common schemas, but given how they're built, how would I go about customizing them?

The newest version (3.5) of mongoose doesn't let you call mongoose.model more than once for a given schema, and since you call it in store.js my original plan for changing them (pull your schema in via store, make my changes, and re-model it) is broken.

@pvencill
Copy link
Author

pvencill commented Jan 3, 2013

Thinking about it some more, I wonder if it wouldn't be more appropriate to just expose the raw schemas on the module, rather than forcing someone to call new Store() to get the models.

@mwawrusch
Copy link
Member

Probably just add some kind of factory method to store + exposing the models through index.

I need to think about this when I am clearheaded, right now I am down with some nasty stomach virus...

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

No branches or pull requests

2 participants