Skip to content

Op.not operator is ignored when used with Sequelize.where() #13602

Closed

Description

@ephys

Issue Creation Checklist

Bug Description

the NOT operator is ignored when used with Sequelize.where like in this exemple

SSCCE

Here is the link to the SSCCE for this issue: sequelize/sequelize-sscce#194

What do you expect to happen?

{ [Op.not]: Sequelize.where(col, op, value) } generates as as NOT(col op value)

What is actually happening?

The generated query is lacking a NOT operator: { [Op.not]: Sequelize.where(col, op, value) } generates as as col op value

Additional context

Add any other context and details here.

Environment

  • Sequelize version: 6.8.0
  • Node.js version: 14.18.1

Bug Report Checklist

How does this problem relate to dialects?

  • I think this problem happens regardless of the dialect.
  • I think this problem happens only for the following dialect(s):
  • I don't know, I was using PUT-YOUR-DIALECT-HERE, with connector library version XXX and database version XXX

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.

Activity

  1. github-actions commented on Nov 4, 2021

    @github-actions
  2. ephys commented on Nov 4, 2021

    @ephys
    Author
  3. github-actions commented on Nov 19, 2021

    @github-actions
  4. ephys commented on Nov 19, 2021

    @ephys
    Author
  5. added
    type: bug
    and removed on Nov 19, 2021
  6. madguy02 commented on Nov 27, 2021

    @madguy02
    Member

    @WikiRik can i start looking into this issue? If you haven't taken it up already?

  7. WikiRik commented on Nov 27, 2021

    @WikiRik
    Member

    It would be great if you could look into this issue, thanks!

  8. self-assigned this
    on Jan 26, 2022
  9. added this to the v7 milestone on Jan 26, 2022
  10. removed this from the v7 milestone on Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions