I'm using the Sequelize package for node. I have a typical include on man to many relationship.
Item.findAll({
include: {model: Blah: as 'blahs'}
});
All works well but it returns the set with the pivot data on each sub item. I don't need it. Is there any way to disable it or to specify the pivot fields needed?
Found my answer:
{model: Model, as: 'model', through: {attributes: []}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With