{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/7092","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/7092/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/7092/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/7092/events","html_url":"https://github.com/cakephp/cakephp/issues/7092","id":96560348,"number":7092,"title":"ORM: Unexpected behavior with 'WHERE NOT IN' and empty array","user":{"login":"chinpei215","id":7399393,"avatar_url":"https://avatars.githubusercontent.com/u/7399393?v=3","gravatar_id":"","url":"https://api.github.com/users/chinpei215","html_url":"https://github.com/chinpei215","followers_url":"https://api.github.com/users/chinpei215/followers","following_url":"https://api.github.com/users/chinpei215/following{/other_user}","gists_url":"https://api.github.com/users/chinpei215/gists{/gist_id}","starred_url":"https://api.github.com/users/chinpei215/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinpei215/subscriptions","organizations_url":"https://api.github.com/users/chinpei215/orgs","repos_url":"https://api.github.com/users/chinpei215/repos","events_url":"https://api.github.com/users/chinpei215/events{/privacy}","received_events_url":"https://api.github.com/users/chinpei215/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/53","html_url":"https://github.com/cakephp/cakephp/milestones/3.0.11","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/53/labels","id":1219730,"number":53,"title":"3.0.11","description":"","creator":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":5,"state":"open","created_at":"2015-07-22T07:42:38Z","updated_at":"2015-07-22T21:17:16Z","due_on":"2015-08-01T22:00:00Z","closed_at":null},"comments":7,"created_at":"2015-07-22T12:47:04Z","updated_at":"2015-07-23T08:56:29Z","closed_at":null,"body":"```php\r\n$articles->find()->where(function($exp,$q){\r\n    return $exp->notIn('id', []);\r\n});\r\n\r\n# WHERE 1 != 1\r\n```\r\nSo this query returns no rows.\r\nThis may be a feature, but this is the opposite of what I expected.\r\n\r\nIn CakePHP 2.x:\r\n```php\r\n$Article->find('all', [\r\n\t'conditions' => [\r\n\t\t'id !=' => [],\r\n\t]\r\n]);\r\n\r\n# WHERE `id` IS NOT NULL\r\n```\r\n\r\nIn http://www.doctrine-project.org/jira/browse/DDC-3063 , they are talking about a same issue."},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/124026216","html_url":"https://github.com/cakephp/cakephp/issues/7092#issuecomment-124026216","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/7092","id":124026216,"user":{"login":"dereuromark","id":39854,"avatar_url":"https://avatars.githubusercontent.com/u/39854?v=3","gravatar_id":"","url":"https://api.github.com/users/dereuromark","html_url":"https://github.com/dereuromark","followers_url":"https://api.github.com/users/dereuromark/followers","following_url":"https://api.github.com/users/dereuromark/following{/other_user}","gists_url":"https://api.github.com/users/dereuromark/gists{/gist_id}","starred_url":"https://api.github.com/users/dereuromark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereuromark/subscriptions","organizations_url":"https://api.github.com/users/dereuromark/orgs","repos_url":"https://api.github.com/users/dereuromark/repos","events_url":"https://api.github.com/users/dereuromark/events{/privacy}","received_events_url":"https://api.github.com/users/dereuromark/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T08:56:29Z","updated_at":"2015-07-23T08:56:29Z","body":"Sounds to me we should go the 2.x way here and output `WHERE `id` IS NOT NULL`."}}