{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/2923","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/2923/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/2923/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/2923/events","html_url":"https://github.com/sequelize/sequelize/issues/2923","id":54162763,"number":2923,"title":"Seqeulize $not comparator broken. To also add support for $not: { $any } and $not: { $contains }.","user":{"login":"calvintwr","id":6825277,"avatar_url":"https://avatars.githubusercontent.com/u/6825277?v=3","gravatar_id":"","url":"https://api.github.com/users/calvintwr","html_url":"https://github.com/calvintwr","followers_url":"https://api.github.com/users/calvintwr/followers","following_url":"https://api.github.com/users/calvintwr/following{/other_user}","gists_url":"https://api.github.com/users/calvintwr/gists{/gist_id}","starred_url":"https://api.github.com/users/calvintwr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvintwr/subscriptions","organizations_url":"https://api.github.com/users/calvintwr/orgs","repos_url":"https://api.github.com/users/calvintwr/repos","events_url":"https://api.github.com/users/calvintwr/events{/privacy}","received_events_url":"https://api.github.com/users/calvintwr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sequelize/sequelize/labels/discussion","name":"discussion","color":"d4c5f9"},{"url":"https://api.github.com/repos/sequelize/sequelize/labels/feature","name":"feature","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2015-01-13T08:28:03Z","updated_at":"2015-03-14T19:15:00Z","closed_at":null,"body":"From: http://sequelize.readthedocs.org/en/latest/api/model/\r\nThe possible comparators for the where criterias: \r\n\r\n    gt, gte, lt, lte, ne, between/.., nbetween/notbetween/!.., in, not, like, nlike/notlike\r\n\r\nThere is a a \"not\" comparator but it when used it produces the sql:\r\n\r\n    // sequelize where\r\n    where: { someField: { not: true }} \r\n\r\n    // generated query\r\n    \"someField\" NOT IN (true);\r\n\r\nThis doesn't allow fields that are NULL to be selected. Suppose the `NOT` comparater is used, it would pick up rows that have `someField` with `NULL` values.\r\n\r\nIn order to maintain BC, I propose `nt` as `NOT`. In order to avoid confusion, we should deprecated `not` and use `notIn`.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/80681805","html_url":"https://github.com/sequelize/sequelize/issues/2923#issuecomment-80681805","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/2923","id":80681805,"user":{"login":"calvintwr","id":6825277,"avatar_url":"https://avatars.githubusercontent.com/u/6825277?v=3","gravatar_id":"","url":"https://api.github.com/users/calvintwr","html_url":"https://github.com/calvintwr","followers_url":"https://api.github.com/users/calvintwr/followers","following_url":"https://api.github.com/users/calvintwr/following{/other_user}","gists_url":"https://api.github.com/users/calvintwr/gists{/gist_id}","starred_url":"https://api.github.com/users/calvintwr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvintwr/subscriptions","organizations_url":"https://api.github.com/users/calvintwr/orgs","repos_url":"https://api.github.com/users/calvintwr/repos","events_url":"https://api.github.com/users/calvintwr/events{/privacy}","received_events_url":"https://api.github.com/users/calvintwr/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T19:15:00Z","updated_at":"2015-03-14T19:15:00Z","body":"I gather the following conclusion:\r\n\r\n1) No use case for `ANY(ARRAY[])`. `$any: [array]` should just output `ANY(VALUES())`. I think this is being done.\r\n\r\n2) No use case for `arrayField: {$any: [array]}`. In fact I might be correct to say that's wrong syntax, cause ANY can only be used to check a single value against an array field.\r\n\r\n3) Hence `$not: {$any}` is just $notIn.\r\n\r\nCurious question: why do we have $notIn, $notLike etc, but you want $not: {$any} instead of $notAny.\r\n\r\n4) Lastly we need to write the support for $notCotains and possibly $notContained"}}