-
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
Confusing Code in ModelRegistry #127
Comments
Can you provide minimal failing models code? |
This is what is failing:
I freely admit that I may be doing this completely wrong. The pattern of my project doesn't match up with the example at all. I can't just require('./models')...all my models (and schema0 are in the BChattySchema:
|
Basicly formage needs human names for you models. You could try and init
P.S. it seems to me that you over normalized your data model. If for you that is more comfortable, you could use a relational DBMS like postgresSQL or MySQL, which have better back-office tools. |
Good news! I got past the first error and am on the next. Looks like I had a field in one of my Schemas that was just set to 'Array' and formage wasn't liking that. I changed it to [] and same issue. It was a placeholder anyway so commenting it out worked. Now I'm getting:Fatal error: Most middleware (like urlencoded) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware. Which I guess relates to Express 4. I'm guessing formage isn't compatible? If so is there an upgrade guide? Please close this issue. Thanks for the help. PS... most of these collections are just annotation of quick stream look up collections. Most of this started in a relational DB and I moved it to mongo because it was much better/faster at the clustered indexable tables I was using. |
@skilesare did you solve the connect middleware issue? I'm getting the same thing. |
The following code in the ModelRegistry constructor doesn't seem to make sense. In the callback modelName is actually the index for the lodash _.foreach function
Seems like it should be this.registerMode(model,model.modelName). Maybe you are meaning to name things as the index, but later you try to humanize this term. I keep getting an error when you call capitalize on the 0(the index of the first item). I guess I'd pass this if I had a label on my model, but I don't.
The text was updated successfully, but these errors were encountered: