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
3.5 introduce include.separate which will split your query into multiple parts, if the include contains a limit, beacuse the limit is easier to do in two separate queries.
However, in this case it doesn't seem like a good idea... But we'd need a better way to know that you're referring to the main table .. Its hard to know when its just a string :). Slightly related to #3095
You could set separate: false in the include, then it will use a single query - but I'm not sure the limit actually works then? @mickhansen
Perfect ! The limit is just to ensure that the selected user as at least one operation which respect the condition (I do not need the operation at all, just the condition, that's just for performance, probably attributes: [] is better...).
I'm surprised that there is two queries, because the first one select all the users, and the final filtering is based on the result of the second query.
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 🙂
Since sequelize 3.5, the following:
results in two queries:
and:
But in the second query,
user
is missing in from clause:The text was updated successfully, but these errors were encountered: