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
Group by is propagating to separated includes #9748
Sometimes I need the full structure, sometimes half, sometimes there's a where condition to the title of one of the translations. Bottom line is, I have semi-demi-ORM before the Sequelize ORM which builds (among other things) the necessary includes.
Because the findAndCountAll is sort of broken in v4 (I've heard it's fixed on v5, but can't upgrade on account of other stuff), I opted to separate: true the hasMany associations if and only if that association is not being used on where or order. If it is, I need to group by the main table primary key.
The problem arises because Sequelize applies that same group to the separate'd queries - which, of course, breaks them.
What do you expect to happen?
Not apply group to associations which are separate.
Sorry my main work laptop is out of commission, which contain Sequelize dev setup. I wanted to include a few more changes to new release, you will have to wait for a few more days.
Meanwhile you can directly use sequelize/sequelize (for master branch) in your package.json
It seems that this issue still exists.
I am on 5.8.6 and the GROUP BY clause gets added to the separate: true include. @mjamado, can you confirm that?
UPDATE: I saw, that this is caused by the sequelize-view-support which uses an < 5 version of sequelize where the issue is not fixed at this point in time.
Activity
sushantdhiman commentedon Aug 1, 2018
Will accept PR with short test case
fix(hasMany): don't propagate group to separated queries
mjamado commentedon Aug 1, 2018
If somebody could pretty please include the pull request on v5.0.0-beta.11 and release it... 🙏
sushantdhiman commentedon Aug 2, 2018
Thanks for the PR, fix will be released as
5.0.0-beta.11, may be this weekend :)mjamado commentedon Aug 9, 2018
Any news on release date?
sushantdhiman commentedon Aug 9, 2018
Sorry my main work laptop is out of commission, which contain Sequelize dev setup. I wanted to include a few more changes to new release, you will have to wait for a few more days.
Meanwhile you can directly use
sequelize/sequelize(for master branch) in yourpackage.jsonmjamado commentedon Aug 9, 2018
Wow, 5+ years of dealing with
package.jsonandnpm, didn't know that repository trick. Thanks a lot!tizzyapunkt commentedon May 27, 2019
It seems that this issue still exists.
I am on 5.8.6 and the GROUP BY clause gets added to the
separate: trueinclude.@mjamado, can you confirm that?
UPDATE: I saw, that this is caused by the sequelize-view-support which uses an < 5 version of sequelize where the issue is not fixed at this point in time.