{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/comments/49818644","id":49818644,"diff_hunk":"@@ -200,17 +200,7 @@ MySQL.prototype.executeSQL = function(sql, params, options, callback) {\n   }\n };\n \n-/**\n- * Update if the model instance exists with the same id or create a new instance\n- *\n- * @param {String} model The model name\n- * @param {Object} data The model instance data\n- * @param {Function} [callback] The callback function\n- */\n-MySQL.prototype.updateOrCreate = MySQL.prototype.save =\n-  function(model, data, options, callback) {\n-    var fields = this.buildFields(model, data);\n-","path":"lib/mysql.js","position":14,"original_position":14,"commit_id":"0fb67ed7c354077c48bd6b374894314e9a5465ca","original_commit_id":"4c5ddc0c822a6150301cfddf752a0b6673c188f1","user":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"body":"there you go ;)","created_at":"2016-01-15T03:53:30Z","updated_at":"2016-01-15T03:53:30Z","html_url":"https://github.com/strongloop/loopback-connector-mysql/pull/139#discussion_r49818644","pull_request_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/comments/49818644"},"html":{"href":"https://github.com/strongloop/loopback-connector-mysql/pull/139#discussion_r49818644"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/139","id":53038804,"html_url":"https://github.com/strongloop/loopback-connector-mysql/pull/139","diff_url":"https://github.com/strongloop/loopback-connector-mysql/pull/139.diff","patch_url":"https://github.com/strongloop/loopback-connector-mysql/pull/139.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues/139","number":139,"state":"open","locked":false,"title":"Implementation of ReplaceOrCreate - mysql","user":{"login":"Amir-61","id":10672146,"avatar_url":"https://avatars.githubusercontent.com/u/10672146?v=3","gravatar_id":"","url":"https://api.github.com/users/Amir-61","html_url":"https://github.com/Amir-61","followers_url":"https://api.github.com/users/Amir-61/followers","following_url":"https://api.github.com/users/Amir-61/following{/other_user}","gists_url":"https://api.github.com/users/Amir-61/gists{/gist_id}","starred_url":"https://api.github.com/users/Amir-61/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amir-61/subscriptions","organizations_url":"https://api.github.com/users/Amir-61/orgs","repos_url":"https://api.github.com/users/Amir-61/repos","events_url":"https://api.github.com/users/Amir-61/events{/privacy}","received_events_url":"https://api.github.com/users/Amir-61/received_events","type":"User","site_admin":false},"body":"Hi @bajtos,\r\n\r\nPlease note this is just in progress implementation (Very initial implementation); just to make sure I'm on the right track.\r\n\r\n##### Added functionality:\r\n   +Implemented `replaceOrCreate` method for `loopback-connector-mysql`\r\n\r\n##### Side note: \r\n* NPM test was failing out of the box.\r\n* This patch requires changes from other modules including `loopback-datasource-juggler`, `loopback-connector` as well.\r\n\r\nConnect to a spike task: https://github.com/strongloop-internal/scrum-loopback/issues/621\r\n\r\nThanks","created_at":"2015-12-08T21:09:39Z","updated_at":"2016-01-15T03:53:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c0f2e14604b25df70e110f0df14b2e2c2487d0a","assignee":{"login":"Amir-61","id":10672146,"avatar_url":"https://avatars.githubusercontent.com/u/10672146?v=3","gravatar_id":"","url":"https://api.github.com/users/Amir-61","html_url":"https://github.com/Amir-61","followers_url":"https://api.github.com/users/Amir-61/followers","following_url":"https://api.github.com/users/Amir-61/following{/other_user}","gists_url":"https://api.github.com/users/Amir-61/gists{/gist_id}","starred_url":"https://api.github.com/users/Amir-61/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amir-61/subscriptions","organizations_url":"https://api.github.com/users/Amir-61/orgs","repos_url":"https://api.github.com/users/Amir-61/repos","events_url":"https://api.github.com/users/Amir-61/events{/privacy}","received_events_url":"https://api.github.com/users/Amir-61/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/milestones/41","html_url":"https://github.com/strongloop/loopback-connector-mysql/milestones/%23Epic:%20ReplaceOrCreate","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/milestones/41/labels","id":1487108,"number":41,"title":"#Epic: ReplaceOrCreate","description":null,"creator":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-01-06T12:37:37Z","updated_at":"2016-01-06T15:58:50Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/139/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/139/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues/139/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/statuses/0fb67ed7c354077c48bd6b374894314e9a5465ca","head":{"label":"strongloop:replace","ref":"replace","sha":"0fb67ed7c354077c48bd6b374894314e9a5465ca","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":11557649,"name":"loopback-connector-mysql","full_name":"strongloop/loopback-connector-mysql","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-connector-mysql","description":"Loopback Connector for MySQL","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-connector-mysql","forks_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/releases{/id}","created_at":"2013-07-21T05:28:58Z","updated_at":"2015-11-24T17:59:48Z","pushed_at":"2016-01-15T03:52:43Z","git_url":"git://github.com/strongloop/loopback-connector-mysql.git","ssh_url":"git@github.com:strongloop/loopback-connector-mysql.git","clone_url":"https://github.com/strongloop/loopback-connector-mysql.git","svn_url":"https://github.com/strongloop/loopback-connector-mysql","homepage":null,"size":525,"stargazers_count":30,"watchers_count":30,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":49,"forks":42,"open_issues":49,"watchers":30,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"f4e488a789d02b0afc3d5ca072cf4b90eb0c8190","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":11557649,"name":"loopback-connector-mysql","full_name":"strongloop/loopback-connector-mysql","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-connector-mysql","description":"Loopback Connector for MySQL","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-connector-mysql","forks_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-connector-mysql/releases{/id}","created_at":"2013-07-21T05:28:58Z","updated_at":"2015-11-24T17:59:48Z","pushed_at":"2016-01-15T03:52:43Z","git_url":"git://github.com/strongloop/loopback-connector-mysql.git","ssh_url":"git@github.com:strongloop/loopback-connector-mysql.git","clone_url":"https://github.com/strongloop/loopback-connector-mysql.git","svn_url":"https://github.com/strongloop/loopback-connector-mysql","homepage":null,"size":525,"stargazers_count":30,"watchers_count":30,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":49,"forks":42,"open_issues":49,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/139"},"html":{"href":"https://github.com/strongloop/loopback-connector-mysql/pull/139"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues/139"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mysql/statuses/0fb67ed7c354077c48bd6b374894314e9a5465ca"}}}}