Sequelize how to extract specific fields from concatenated tables
I have:
db.Animal.findAll({ attributes: ['id', 'name'], include: [db.Age] }).success(function(results) {
console.log(JSON.stringify(results));
});
It gives me the field ids and NAME from the Animal table ... but I also want to get specific fields from the Age table, not all fields (this works now).
What can I do?
+3
source to share