I\'m currently experimenting with Sequelize and have two objects, a Person
and Position
, When getting a list of persons I want to get their position. <
since I rewrote sequelize for 1.0 I removed the support of fetchAssociations. I will add it in the next weeks. But let's take a look at your code:
You are using underscore-like column names, so you probably want to use the underscore option for automatically generated columns: http://www.sequelizejs.com/?active=usage#usage --> scroll a bit down or search for underscore. This might save you the options for belongsTo/hasMany.
What you want to do with findAll is smth. like this:
User.findAll().on('success', function(users) {
// asd
})
And as I just noticed... it's somewhat tricky to get all associated objects :D So much for now. Hope that helped.