Closed drochag closed 9 years ago
@DanMMX what version of the generator? Also could you post your .yo-rc.json
?
The only way I have been able to reproduce this is by selecting both mongoose
and sequelize
, but then selecting mongoose
as the default for the models.
I selected only sequelize (99% sure)
{
"generator-angular-fullstack": {
"endpointDirectory": "server/api/",
"insertRoutes": true,
"registerRoutesFile": "server/routes.js",
"routesNeedle": "// Insert routes below",
"routesBase": "/api/",
"pluralizeRoutes": true,
"insertSockets": true,
"registerSocketsFile": "server/config/socketio.js",
"socketsNeedle": "// Insert sockets below",
"insertModels": true,
"registerModelsFile": "server/sqldb/index.js",
"modelsNeedle": "// Insert models below",
"filters": {
"js": true,
"babel": true,
"jade": true,
"less": true,
"uirouter": true,
"bootstrap": true,
"uibootstrap": true,
"socketio": true,
"models": true,
"sequelizeModels": true,
"sequelize": true,
"grunt": true,
"jasmine": true,
"mocha": false,
"should": false,
"expect": false
}
},
"generator-ng-component": {
"routeDirectory": "client/app/",
"directiveDirectory": "client/app/",
"filterDirectory": "client/app/",
"serviceDirectory": "client/app/",
"basePath": "client",
"moduleName": "",
"filters": [
"uirouter",
"jasmine",
"uirouter"
],
"extensions": [
"babel",
"js",
"jade",
"less"
],
"directiveSimpleTemplates": "",
"directiveComplexTemplates": "",
"filterTemplates": "",
"serviceTemplates": "",
"factoryTemplates": "",
"controllerTemplates": "",
"decoratorTemplates": "",
"providerTemplates": "",
"routeTemplates": ""
}
}
and using the latest canary branch, I guess ~3.0.0-rc5
@DanMMX are the generator ' deps up to date?
ah, npm install
on the generator folder?
I actually meant for the generator. If you're tracking via git then you wont get any updated modules when you git pull
; so I was just checking that you had updated the generator's deps recently.
yep, I ran npm install
after pulling and nothing new was installed, anything else I should run?
I'm not really sure at this point. I can't seem to reproduce the issue.
Well, just pulled, npm installed and generated another one and works correctly, closing this.
For anyone coming up around this issue is enough to add Thing
into server/config/sqldb/index.js
or yo angular-fullstack:endpoint thing
to rebuild the same model.
The
server/config/sqldb/index.js
comes with this in the start.Doesn't include the Thing import making this code
db.Thing = db.sequelize.import('../api/thing/thing.model');
needed or a new endpointthing
to be created.