{"action":"closed","number":6372,"pull_request":{"url":"https://api.github.com/repos/sequelize/sequelize/pulls/6372","id":79995262,"html_url":"https://github.com/sequelize/sequelize/pull/6372","diff_url":"https://github.com/sequelize/sequelize/pull/6372.diff","patch_url":"https://github.com/sequelize/sequelize/pull/6372.patch","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/6372","number":6372,"state":"closed","locked":false,"title":"Fix mysql LIKE where condition on date fields","user":{"login":"rundef","id":2675698,"avatar_url":"https://avatars.githubusercontent.com/u/2675698?v=3","gravatar_id":"","url":"https://api.github.com/users/rundef","html_url":"https://github.com/rundef","followers_url":"https://api.github.com/users/rundef/followers","following_url":"https://api.github.com/users/rundef/following{/other_user}","gists_url":"https://api.github.com/users/rundef/gists{/gist_id}","starred_url":"https://api.github.com/users/rundef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rundef/subscriptions","organizations_url":"https://api.github.com/users/rundef/orgs","repos_url":"https://api.github.com/users/rundef/repos","events_url":"https://api.github.com/users/rundef/events{/privacy}","received_events_url":"https://api.github.com/users/rundef/received_events","type":"User","site_admin":false},"body":"### Pull Request check-list\r\n\r\n_Please make sure to review and check all of these items:_\r\n\r\n- [x] Does `npm run test` or `npm run test-DIALECT` pass with this change (including linting)?\r\n- [x] Does your issue contain a link to existing issue (Closes #[issue]) or a description of the issue you are solving?\r\n- [x] Have you added new tests to prevent regressions?\r\n- [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?\r\n- [x] Have you added an entry under `Future` in the changelog?\r\n\r\n_NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open._\r\n\r\n### Description of change\r\n\r\nI am using the MySQL dialect and when I run this query:\r\n\r\n```js\r\nmodel.findAll({\r\n  where: {\r\n    startedAt: { $like: '2016-07-%' },\r\n  }\r\n})\r\n```\r\n\r\nI get something like this :\r\n`where startedAt LIKE '2016-07-01 04:00:00'`\r\n\r\nBut what I should get is this :\r\n`where startedAt LIKE '2016-07-%'`","created_at":"2016-08-03T23:16:57Z","updated_at":"2016-08-29T11:06:06Z","closed_at":"2016-08-29T11:06:06Z","merged_at":null,"merge_commit_sha":"bbf78e6f0a4fa9a3ddd7d24dbff857dab7b11f62","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sequelize/sequelize/pulls/6372/commits","review_comments_url":"https://api.github.com/repos/sequelize/sequelize/pulls/6372/comments","review_comment_url":"https://api.github.com/repos/sequelize/sequelize/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/6372/comments","statuses_url":"https://api.github.com/repos/sequelize/sequelize/statuses/be71fc2d5b530d6608f401323d963353007dc94c","head":{"label":"rundef:master","ref":"master","sha":"be71fc2d5b530d6608f401323d963353007dc94c","user":{"login":"rundef","id":2675698,"avatar_url":"https://avatars.githubusercontent.com/u/2675698?v=3","gravatar_id":"","url":"https://api.github.com/users/rundef","html_url":"https://github.com/rundef","followers_url":"https://api.github.com/users/rundef/followers","following_url":"https://api.github.com/users/rundef/following{/other_user}","gists_url":"https://api.github.com/users/rundef/gists{/gist_id}","starred_url":"https://api.github.com/users/rundef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rundef/subscriptions","organizations_url":"https://api.github.com/users/rundef/orgs","repos_url":"https://api.github.com/users/rundef/repos","events_url":"https://api.github.com/users/rundef/events{/privacy}","received_events_url":"https://api.github.com/users/rundef/received_events","type":"User","site_admin":false},"repo":{"id":64885106,"name":"sequelize","full_name":"rundef/sequelize","owner":{"login":"rundef","id":2675698,"avatar_url":"https://avatars.githubusercontent.com/u/2675698?v=3","gravatar_id":"","url":"https://api.github.com/users/rundef","html_url":"https://github.com/rundef","followers_url":"https://api.github.com/users/rundef/followers","following_url":"https://api.github.com/users/rundef/following{/other_user}","gists_url":"https://api.github.com/users/rundef/gists{/gist_id}","starred_url":"https://api.github.com/users/rundef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rundef/subscriptions","organizations_url":"https://api.github.com/users/rundef/orgs","repos_url":"https://api.github.com/users/rundef/repos","events_url":"https://api.github.com/users/rundef/events{/privacy}","received_events_url":"https://api.github.com/users/rundef/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rundef/sequelize","description":"Sequelize is an easy-to-use multi sql dialect ORM for Node.js & io.js. It currently supports MySQL, MariaDB, SQLite, PostgreSQL and MSSQL.","fork":true,"url":"https://api.github.com/repos/rundef/sequelize","forks_url":"https://api.github.com/repos/rundef/sequelize/forks","keys_url":"https://api.github.com/repos/rundef/sequelize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rundef/sequelize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rundef/sequelize/teams","hooks_url":"https://api.github.com/repos/rundef/sequelize/hooks","issue_events_url":"https://api.github.com/repos/rundef/sequelize/issues/events{/number}","events_url":"https://api.github.com/repos/rundef/sequelize/events","assignees_url":"https://api.github.com/repos/rundef/sequelize/assignees{/user}","branches_url":"https://api.github.com/repos/rundef/sequelize/branches{/branch}","tags_url":"https://api.github.com/repos/rundef/sequelize/tags","blobs_url":"https://api.github.com/repos/rundef/sequelize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rundef/sequelize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rundef/sequelize/git/refs{/sha}","trees_url":"https://api.github.com/repos/rundef/sequelize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rundef/sequelize/statuses/{sha}","languages_url":"https://api.github.com/repos/rundef/sequelize/languages","stargazers_url":"https://api.github.com/repos/rundef/sequelize/stargazers","contributors_url":"https://api.github.com/repos/rundef/sequelize/contributors","subscribers_url":"https://api.github.com/repos/rundef/sequelize/subscribers","subscription_url":"https://api.github.com/repos/rundef/sequelize/subscription","commits_url":"https://api.github.com/repos/rundef/sequelize/commits{/sha}","git_commits_url":"https://api.github.com/repos/rundef/sequelize/git/commits{/sha}","comments_url":"https://api.github.com/repos/rundef/sequelize/comments{/number}","issue_comment_url":"https://api.github.com/repos/rundef/sequelize/issues/comments{/number}","contents_url":"https://api.github.com/repos/rundef/sequelize/contents/{+path}","compare_url":"https://api.github.com/repos/rundef/sequelize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rundef/sequelize/merges","archive_url":"https://api.github.com/repos/rundef/sequelize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rundef/sequelize/downloads","issues_url":"https://api.github.com/repos/rundef/sequelize/issues{/number}","pulls_url":"https://api.github.com/repos/rundef/sequelize/pulls{/number}","milestones_url":"https://api.github.com/repos/rundef/sequelize/milestones{/number}","notifications_url":"https://api.github.com/repos/rundef/sequelize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rundef/sequelize/labels{/name}","releases_url":"https://api.github.com/repos/rundef/sequelize/releases{/id}","deployments_url":"https://api.github.com/repos/rundef/sequelize/deployments","created_at":"2016-08-03T23:00:36Z","updated_at":"2016-08-03T23:00:43Z","pushed_at":"2016-08-04T16:09:47Z","git_url":"git://github.com/rundef/sequelize.git","ssh_url":"git@github.com:rundef/sequelize.git","clone_url":"https://github.com/rundef/sequelize.git","svn_url":"https://github.com/rundef/sequelize","homepage":"http://sequelizejs.com","size":18336,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sequelize:master","ref":"master","sha":"40342064f006c0ede35ca1a0e456dc08b1d43a95","user":{"login":"sequelize","id":3591786,"avatar_url":"https://avatars.githubusercontent.com/u/3591786?v=3","gravatar_id":"","url":"https://api.github.com/users/sequelize","html_url":"https://github.com/sequelize","followers_url":"https://api.github.com/users/sequelize/followers","following_url":"https://api.github.com/users/sequelize/following{/other_user}","gists_url":"https://api.github.com/users/sequelize/gists{/gist_id}","starred_url":"https://api.github.com/users/sequelize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequelize/subscriptions","organizations_url":"https://api.github.com/users/sequelize/orgs","repos_url":"https://api.github.com/users/sequelize/repos","events_url":"https://api.github.com/users/sequelize/events{/privacy}","received_events_url":"https://api.github.com/users/sequelize/received_events","type":"Organization","site_admin":false},"repo":{"id":790359,"name":"sequelize","full_name":"sequelize/sequelize","owner":{"login":"sequelize","id":3591786,"avatar_url":"https://avatars.githubusercontent.com/u/3591786?v=3","gravatar_id":"","url":"https://api.github.com/users/sequelize","html_url":"https://github.com/sequelize","followers_url":"https://api.github.com/users/sequelize/followers","following_url":"https://api.github.com/users/sequelize/following{/other_user}","gists_url":"https://api.github.com/users/sequelize/gists{/gist_id}","starred_url":"https://api.github.com/users/sequelize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequelize/subscriptions","organizations_url":"https://api.github.com/users/sequelize/orgs","repos_url":"https://api.github.com/users/sequelize/repos","events_url":"https://api.github.com/users/sequelize/events{/privacy}","received_events_url":"https://api.github.com/users/sequelize/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sequelize/sequelize","description":"An easy-to-use multi SQL dialect ORM for Node.js 💠 ","fork":false,"url":"https://api.github.com/repos/sequelize/sequelize","forks_url":"https://api.github.com/repos/sequelize/sequelize/forks","keys_url":"https://api.github.com/repos/sequelize/sequelize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sequelize/sequelize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sequelize/sequelize/teams","hooks_url":"https://api.github.com/repos/sequelize/sequelize/hooks","issue_events_url":"https://api.github.com/repos/sequelize/sequelize/issues/events{/number}","events_url":"https://api.github.com/repos/sequelize/sequelize/events","assignees_url":"https://api.github.com/repos/sequelize/sequelize/assignees{/user}","branches_url":"https://api.github.com/repos/sequelize/sequelize/branches{/branch}","tags_url":"https://api.github.com/repos/sequelize/sequelize/tags","blobs_url":"https://api.github.com/repos/sequelize/sequelize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sequelize/sequelize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sequelize/sequelize/git/refs{/sha}","trees_url":"https://api.github.com/repos/sequelize/sequelize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sequelize/sequelize/statuses/{sha}","languages_url":"https://api.github.com/repos/sequelize/sequelize/languages","stargazers_url":"https://api.github.com/repos/sequelize/sequelize/stargazers","contributors_url":"https://api.github.com/repos/sequelize/sequelize/contributors","subscribers_url":"https://api.github.com/repos/sequelize/sequelize/subscribers","subscription_url":"https://api.github.com/repos/sequelize/sequelize/subscription","commits_url":"https://api.github.com/repos/sequelize/sequelize/commits{/sha}","git_commits_url":"https://api.github.com/repos/sequelize/sequelize/git/commits{/sha}","comments_url":"https://api.github.com/repos/sequelize/sequelize/comments{/number}","issue_comment_url":"https://api.github.com/repos/sequelize/sequelize/issues/comments{/number}","contents_url":"https://api.github.com/repos/sequelize/sequelize/contents/{+path}","compare_url":"https://api.github.com/repos/sequelize/sequelize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sequelize/sequelize/merges","archive_url":"https://api.github.com/repos/sequelize/sequelize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sequelize/sequelize/downloads","issues_url":"https://api.github.com/repos/sequelize/sequelize/issues{/number}","pulls_url":"https://api.github.com/repos/sequelize/sequelize/pulls{/number}","milestones_url":"https://api.github.com/repos/sequelize/sequelize/milestones{/number}","notifications_url":"https://api.github.com/repos/sequelize/sequelize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sequelize/sequelize/labels{/name}","releases_url":"https://api.github.com/repos/sequelize/sequelize/releases{/id}","deployments_url":"https://api.github.com/repos/sequelize/sequelize/deployments","created_at":"2010-07-22T07:11:11Z","updated_at":"2016-08-29T10:26:46Z","pushed_at":"2016-08-29T08:10:23Z","git_url":"git://github.com/sequelize/sequelize.git","ssh_url":"git@github.com:sequelize/sequelize.git","clone_url":"https://github.com/sequelize/sequelize.git","svn_url":"https://github.com/sequelize/sequelize","homepage":"http://sequelizejs.com","size":55887,"stargazers_count":7378,"watchers_count":7378,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1520,"mirror_url":null,"open_issues_count":702,"forks":1520,"open_issues":702,"watchers":7378,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/6372"},"html":{"href":"https://github.com/sequelize/sequelize/pull/6372"},"issue":{"href":"https://api.github.com/repos/sequelize/sequelize/issues/6372"},"comments":{"href":"https://api.github.com/repos/sequelize/sequelize/issues/6372/comments"},"review_comments":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/6372/comments"},"review_comment":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/6372/commits"},"statuses":{"href":"https://api.github.com/repos/sequelize/sequelize/statuses/be71fc2d5b530d6608f401323d963353007dc94c"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":0,"commits":4,"additions":13,"deletions":1,"changed_files":4}}
{"actor":{"display_login":"rundef"}}