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
Include with where and order on aliased column creates incorrect query #8100
I expect it to generate a query to get the latest customer with team_id = 5, including all their orders.
What is actually happening?
Sequelize is generating an invalid query. The inner query aliased the created_at column to createdAt correctly, so it does not exist in the outer query to order by. This causes the error column customers.created_at does not exist.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂
Activity
Chapurin commentedon Aug 12, 2017
Sequelize ORDER in subquery and main query this problem for me to
Chapurin commentedon Aug 12, 2017
The solution for me is to roll back to version v3.24.3 and use order as plain string (not as an array value) ((
gc1508 commentedon Aug 14, 2017
GROUP BY also causes issues as far as I can tell.
hiradimir commentedon Sep 16, 2017
I have same issue.
I can not find workaround
stale commentedon Dec 15, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂
kingjerod commentedon Dec 15, 2017
This is still an issue.
aprilmintacpineda commentedon Feb 23, 2018
#8802
#9095
#8602
jharting commentedon Mar 15, 2018
@kingjerod this should be fixed with #9188
Can you verify?
stale commentedon Jun 13, 2018
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂
faq885 commentedon Mar 31, 2019
i am still having issues with this...
Exilz commentedon Jan 12, 2020
I still cannot fix this problem unless I set
subQuery: falsein thefetchAllmethod options.aristov commentedon Mar 24, 2020
subQuery: falsehelps, but breaks the limit/offset.