{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/comments/47436108","id":47436108,"diff_hunk":"@@ -802,6 +821,48 @@ MongoDB.prototype.count = function count(model, where, options, callback) {\n };\n \n /**\n+ * Replace properties for the model instance data\n+ * @param {String} model The model name\n+ * @param {*} id The instance id\n+ * @param {Object} data The model data\n+ * @param {Function} [cb] The callback function\n+ */\n+MongoDB.prototype.replaceAttributes = function replaceAttrs(model, id, data, options, cb) {","path":"lib/mongodb.js","position":36,"original_position":36,"commit_id":"1928f32595bc3cb14ee9c28f5f0acec676d76420","original_commit_id":"1928f32595bc3cb14ee9c28f5f0acec676d76420","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":"Remove `replaceAttrs`. Should look like `... = function(model, id, data, ...)`.","created_at":"2015-12-12T20:10:23Z","updated_at":"2015-12-12T20:10:23Z","html_url":"https://github.com/strongloop/loopback-connector-mongodb/pull/202#discussion_r47436108","pull_request_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/202","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/comments/47436108"},"html":{"href":"https://github.com/strongloop/loopback-connector-mongodb/pull/202#discussion_r47436108"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/202"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/202","id":53045357,"html_url":"https://github.com/strongloop/loopback-connector-mongodb/pull/202","diff_url":"https://github.com/strongloop/loopback-connector-mongodb/pull/202.diff","patch_url":"https://github.com/strongloop/loopback-connector-mongodb/pull/202.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues/202","number":202,"state":"open","locked":false,"title":"WIP: Initial implementation for replace - mongodb","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##### Added functionality:\r\n\r\n*Initial implementation for replaceAttribute\r\n*Initial implementation for replaceOrCreate\r\n\r\n##### Other notes:\r\n\r\n* These changes are related to the changes in the pull requests under `loopback-connector` and `loopback-datasource-juggler`\r\n* It seems test cases cannot be run on windows machines; I need to dig into it.\r\n\r\n","created_at":"2015-12-08T22:01:57Z","updated_at":"2015-12-12T20:10:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4021109f9786b29c5bc1b1550994906141031aec","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/202/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/202/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues/202/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/statuses/1928f32595bc3cb14ee9c28f5f0acec676d76420","head":{"label":"strongloop:replace","ref":"replace","sha":"1928f32595bc3cb14ee9c28f5f0acec676d76420","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":10975056,"name":"loopback-connector-mongodb","full_name":"strongloop/loopback-connector-mongodb","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-mongodb","description":"The official MongoDB connector for the LoopBack framework.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb","forks_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/releases{/id}","created_at":"2013-06-26T18:04:58Z","updated_at":"2015-12-09T15:40:27Z","pushed_at":"2015-12-11T23:20:00Z","git_url":"git://github.com/strongloop/loopback-connector-mongodb.git","ssh_url":"git@github.com:strongloop/loopback-connector-mongodb.git","clone_url":"https://github.com/strongloop/loopback-connector-mongodb.git","svn_url":"https://github.com/strongloop/loopback-connector-mongodb","homepage":"https://docs.strongloop.com/display/public/LB/MongoDB+connector","size":2024,"stargazers_count":60,"watchers_count":60,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":70,"forks":66,"open_issues":70,"watchers":60,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"cbdaaa0b5f4e76c04bf32ed66d93a3a24c99a473","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":10975056,"name":"loopback-connector-mongodb","full_name":"strongloop/loopback-connector-mongodb","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-mongodb","description":"The official MongoDB connector for the LoopBack framework.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb","forks_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/releases{/id}","created_at":"2013-06-26T18:04:58Z","updated_at":"2015-12-09T15:40:27Z","pushed_at":"2015-12-11T23:20:00Z","git_url":"git://github.com/strongloop/loopback-connector-mongodb.git","ssh_url":"git@github.com:strongloop/loopback-connector-mongodb.git","clone_url":"https://github.com/strongloop/loopback-connector-mongodb.git","svn_url":"https://github.com/strongloop/loopback-connector-mongodb","homepage":"https://docs.strongloop.com/display/public/LB/MongoDB+connector","size":2024,"stargazers_count":60,"watchers_count":60,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":70,"forks":66,"open_issues":70,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/202"},"html":{"href":"https://github.com/strongloop/loopback-connector-mongodb/pull/202"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues/202"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/issues/202/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/202/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/pulls/202/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mongodb/statuses/1928f32595bc3cb14ee9c28f5f0acec676d76420"}}}}