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

Working with sails-cassandra #23

Open
karthikshanmugam opened this issue Jul 10, 2015 · 1 comment
Open

Working with sails-cassandra #23

karthikshanmugam opened this issue Jul 10, 2015 · 1 comment

Comments

@karthikshanmugam
Copy link

Hi,

I just modified the code to use sails-cassandra instead of redis.

Can you please help me the fix the below error?

I can see the new tables being created in the Cassandra database, but it just fails with the below error log.

TypeError: Cannot read property 'collections' of undefined
at setModel (/home/ubuntu/nodejs/t4h_auth_good/node_modules/openid-connect/node_modules/modelling/index.js:209:30)
at procModels (/home/ubuntu/nodejs/t4h_auth_good/node_modules/openid-connect/node_modules/modelling/index.js:200:7)
at /home/ubuntu/nodejs/t4h_auth_good/node_modules/openid-connect/node_modules/modelling/index.js:223:6
at Layer.handle as handle_request
at next (/home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/route.js:112:3)
at Layer.handle as handle_request
at /home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/index.js:330:12)
at next (/home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/index.js:271:10)
at serveStatic (/home/ubuntu/nodejs/t4h_auth_good/node_modules/express/node_modules/serve-static/index.js:74:16)
at Layer.handle as handle_request
at trim_prefix (/home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/index.js:312:13)
at /home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/index.js:330:12)
at next (/home/ubuntu/nodejs/t4h_auth_good/node_modules/express/lib/router/index.js:271:10)

Best regards,
Karthik

@agmoyano
Copy link
Owner

Hi, it seems that when it conects to cassandra, it's not returning the models... You should debug in index.js of modelling on done function after orm is initialized. You should check what happens in this line:

self._model = model;

Good luck

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