You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug with include query on many to many relationship #4222
When you make a query on a table with a many to many relationship (i.e. belongs to many through), including the related model, using attributes: [] causes an error.
We were using this feature to make queries based on conditions in the related model and previously this would prevent the related model from being hydrated.
TypeError: Cannot set property 'CatFood' of undefined
at groupJoinData (/.../node_modules/sequelize/lib/dialects/abstract/query.js:329:37)
at AbstractQuery.handleSelectQuery (/.../node_modules/sequelize/lib/dialects/abstract/query.js:537:15)
at Statement.<anonymous> (/.../node_modules/sequelize/lib/dialects/sqlite/query.js:93:33)
I'm experiencing this bug as well. And I think this bug is the same one as #5078 and #5958. Would you be able to point me towards which part of the code you think is causing the problem?
Activity
janmeier commentedon Jul 30, 2015
Hmm, yeah I guess that if
include.attributesis[], so shouldinclude.through.attributesmarkdboyd commentedon Jul 13, 2016
I'm experiencing this bug as well. And I think this bug is the same one as #5078 and #5958. Would you be able to point me towards which part of the code you think is causing the problem?