Any idea how to use an include with attributes (when you need to include only specific fields of the included table) with sequelize?
Currently I have this (but it doesn't work as expected):
var attributes = ['id', 'name', 'bar.version', ['bar.last_modified', 'changed']];
foo.findAll({
where : where,
attributes : attributes,
include : [bar]
}).success(function (result) { ...
Something like this should work
foo.findAll({
where : where,
attributes : attributes,
include : [{ model: bar, attributes: attributes}]
}).success(function (result) {