sequelize Model.hasOne Error: Model is not associated to ModelTwo
I've integrated sequelizejs into my express framework. I got all the models configured and was trying to build my first query with it. I keep getting the error "Error: Model is not associated to ModelTwo!" app.get('/',function(req,res){ db.Member.findAll({include:[{model:db.MemberProfile,as:'Profile'}]}) .success(function(users){ if(users){ res.json(users); }else{ res.send('no users'); } }); }); // model.js module.exports = function(sequelize,sql) { return sequelize.define('Model', { //attributes }); Model.hasOne('ModelTwo',{foreignKey:'model_id'}); }; //model_two.js module.exports = function