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 do
We can do something like that for exclude or include specific attribute with sequelize in Node.js.
Payment.findAll({ where: { DairyId: req.query.dairyid }, attributes: { exclude: ['createdAt', 'updatedAt'] }, include: { model: Customer, attributes:['customerName', 'phoneNumber'] } })