Merge Failure When Using Raw Where Query With Scope #17304
Labels
pending-approval
Bug reports that have not been verified yet, or feature requests that have not been accepted yet
type: bug
Issue Creation Checklist
Bug Description
When I try to chain "withScope" on a model, when using a raw SQL where clause it doesn't merge the successive scopes with "and". This kind of thing used to work in Sequelize 6 via
whereMergeStrategy
, but seems broken in Sequelize7.0.0-alpha.40
Reproducible Example
which produces the SQL
What do you expect to happen?
I would expect it to do this
which produces the SQL
What is actually happening?
As far as I can tell its just replacing the query instead of merging it.
Environment
Would you be willing to resolve this issue by submitting a Pull Request?
Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: