{"action":"closed","number":10,"pull_request":{"url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls/10","id":28601280,"html_url":"https://github.com/lanetix/node-bookshelf-soft-delete/pull/10","diff_url":"https://github.com/lanetix/node-bookshelf-soft-delete/pull/10.diff","patch_url":"https://github.com/lanetix/node-bookshelf-soft-delete/pull/10.patch","issue_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues/10","number":10,"state":"closed","locked":false,"title":"Override model.fetch as well","user":{"login":"apechimp","id":510459,"avatar_url":"https://avatars.githubusercontent.com/u/510459?v=3","gravatar_id":"","url":"https://api.github.com/users/apechimp","html_url":"https://github.com/apechimp","followers_url":"https://api.github.com/users/apechimp/followers","following_url":"https://api.github.com/users/apechimp/following{/other_user}","gists_url":"https://api.github.com/users/apechimp/gists{/gist_id}","starred_url":"https://api.github.com/users/apechimp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apechimp/subscriptions","organizations_url":"https://api.github.com/users/apechimp/orgs","repos_url":"https://api.github.com/users/apechimp/repos","events_url":"https://api.github.com/users/apechimp/events{/privacy}","received_events_url":"https://api.github.com/users/apechimp/received_events","type":"User","site_admin":false},"body":"This resolves #6 and overhauls the method for returning only things which haven't been soft deleted so that it acts as a sql query instead of mutating the results returned from the database. This approach has a few advantages which follow.\r\n\r\n- results of a fetch now correctly report length\r\n- `fetchOne` and `model.fetch` no longer return `null` if there is a thing which has been soft deleted returned first.\r\n- `fetchOne` does not need its own override (bookshelf delegates to the model for this).","created_at":"2015-02-03T23:55:03Z","updated_at":"2015-02-04T14:10:46Z","closed_at":"2015-02-04T14:10:46Z","merged_at":"2015-02-04T14:10:46Z","merge_commit_sha":"fdcff84457dd7bfcb9e8a0ee8f28a6b2f3b4f736","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls/10/commits","review_comments_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls/10/comments","review_comment_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls/comments/{number}","comments_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues/10/comments","statuses_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/statuses/18e9b007ebf15da954736e9fafab3e81c7e1dd69","head":{"label":"lanetix:model-fetch","ref":"model-fetch","sha":"18e9b007ebf15da954736e9fafab3e81c7e1dd69","user":{"login":"lanetix","id":5638751,"avatar_url":"https://avatars.githubusercontent.com/u/5638751?v=3","gravatar_id":"","url":"https://api.github.com/users/lanetix","html_url":"https://github.com/lanetix","followers_url":"https://api.github.com/users/lanetix/followers","following_url":"https://api.github.com/users/lanetix/following{/other_user}","gists_url":"https://api.github.com/users/lanetix/gists{/gist_id}","starred_url":"https://api.github.com/users/lanetix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanetix/subscriptions","organizations_url":"https://api.github.com/users/lanetix/orgs","repos_url":"https://api.github.com/users/lanetix/repos","events_url":"https://api.github.com/users/lanetix/events{/privacy}","received_events_url":"https://api.github.com/users/lanetix/received_events","type":"Organization","site_admin":false},"repo":{"id":28052017,"name":"node-bookshelf-soft-delete","full_name":"lanetix/node-bookshelf-soft-delete","owner":{"login":"lanetix","id":5638751,"avatar_url":"https://avatars.githubusercontent.com/u/5638751?v=3","gravatar_id":"","url":"https://api.github.com/users/lanetix","html_url":"https://github.com/lanetix","followers_url":"https://api.github.com/users/lanetix/followers","following_url":"https://api.github.com/users/lanetix/following{/other_user}","gists_url":"https://api.github.com/users/lanetix/gists{/gist_id}","starred_url":"https://api.github.com/users/lanetix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanetix/subscriptions","organizations_url":"https://api.github.com/users/lanetix/orgs","repos_url":"https://api.github.com/users/lanetix/repos","events_url":"https://api.github.com/users/lanetix/events{/privacy}","received_events_url":"https://api.github.com/users/lanetix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lanetix/node-bookshelf-soft-delete","description":"","fork":false,"url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete","forks_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/forks","keys_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/teams","hooks_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/hooks","issue_events_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues/events{/number}","events_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/events","assignees_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/assignees{/user}","branches_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/branches{/branch}","tags_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/tags","blobs_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/refs{/sha}","trees_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/statuses/{sha}","languages_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/languages","stargazers_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/stargazers","contributors_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/contributors","subscribers_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/subscribers","subscription_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/subscription","commits_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/commits{/sha}","git_commits_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/commits{/sha}","comments_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/comments{/number}","issue_comment_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues/comments/{number}","contents_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/contents/{+path}","compare_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/merges","archive_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/downloads","issues_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues{/number}","pulls_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls{/number}","milestones_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/milestones{/number}","notifications_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/labels{/name}","releases_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/releases{/id}","created_at":"2014-12-15T19:18:34Z","updated_at":"2015-02-03T22:43:58Z","pushed_at":"2015-02-04T14:10:46Z","git_url":"git://github.com/lanetix/node-bookshelf-soft-delete.git","ssh_url":"git@github.com:lanetix/node-bookshelf-soft-delete.git","clone_url":"https://github.com/lanetix/node-bookshelf-soft-delete.git","svn_url":"https://github.com/lanetix/node-bookshelf-soft-delete","homepage":null,"size":139,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"lanetix:master","ref":"master","sha":"072fcb05d2e06ecdae7d7ee254844edd89c347e2","user":{"login":"lanetix","id":5638751,"avatar_url":"https://avatars.githubusercontent.com/u/5638751?v=3","gravatar_id":"","url":"https://api.github.com/users/lanetix","html_url":"https://github.com/lanetix","followers_url":"https://api.github.com/users/lanetix/followers","following_url":"https://api.github.com/users/lanetix/following{/other_user}","gists_url":"https://api.github.com/users/lanetix/gists{/gist_id}","starred_url":"https://api.github.com/users/lanetix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanetix/subscriptions","organizations_url":"https://api.github.com/users/lanetix/orgs","repos_url":"https://api.github.com/users/lanetix/repos","events_url":"https://api.github.com/users/lanetix/events{/privacy}","received_events_url":"https://api.github.com/users/lanetix/received_events","type":"Organization","site_admin":false},"repo":{"id":28052017,"name":"node-bookshelf-soft-delete","full_name":"lanetix/node-bookshelf-soft-delete","owner":{"login":"lanetix","id":5638751,"avatar_url":"https://avatars.githubusercontent.com/u/5638751?v=3","gravatar_id":"","url":"https://api.github.com/users/lanetix","html_url":"https://github.com/lanetix","followers_url":"https://api.github.com/users/lanetix/followers","following_url":"https://api.github.com/users/lanetix/following{/other_user}","gists_url":"https://api.github.com/users/lanetix/gists{/gist_id}","starred_url":"https://api.github.com/users/lanetix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanetix/subscriptions","organizations_url":"https://api.github.com/users/lanetix/orgs","repos_url":"https://api.github.com/users/lanetix/repos","events_url":"https://api.github.com/users/lanetix/events{/privacy}","received_events_url":"https://api.github.com/users/lanetix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lanetix/node-bookshelf-soft-delete","description":"","fork":false,"url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete","forks_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/forks","keys_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/teams","hooks_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/hooks","issue_events_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues/events{/number}","events_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/events","assignees_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/assignees{/user}","branches_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/branches{/branch}","tags_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/tags","blobs_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/refs{/sha}","trees_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/statuses/{sha}","languages_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/languages","stargazers_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/stargazers","contributors_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/contributors","subscribers_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/subscribers","subscription_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/subscription","commits_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/commits{/sha}","git_commits_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/git/commits{/sha}","comments_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/comments{/number}","issue_comment_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues/comments/{number}","contents_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/contents/{+path}","compare_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/merges","archive_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/downloads","issues_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues{/number}","pulls_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls{/number}","milestones_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/milestones{/number}","notifications_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/labels{/name}","releases_url":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/releases{/id}","created_at":"2014-12-15T19:18:34Z","updated_at":"2015-02-03T22:43:58Z","pushed_at":"2015-02-04T14:10:46Z","git_url":"git://github.com/lanetix/node-bookshelf-soft-delete.git","ssh_url":"git@github.com:lanetix/node-bookshelf-soft-delete.git","clone_url":"https://github.com/lanetix/node-bookshelf-soft-delete.git","svn_url":"https://github.com/lanetix/node-bookshelf-soft-delete","homepage":null,"size":139,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls/10"},"html":{"href":"https://github.com/lanetix/node-bookshelf-soft-delete/pull/10"},"issue":{"href":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues/10"},"comments":{"href":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/lanetix/node-bookshelf-soft-delete/statuses/18e9b007ebf15da954736e9fafab3e81c7e1dd69"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"apechimp","id":510459,"avatar_url":"https://avatars.githubusercontent.com/u/510459?v=3","gravatar_id":"","url":"https://api.github.com/users/apechimp","html_url":"https://github.com/apechimp","followers_url":"https://api.github.com/users/apechimp/followers","following_url":"https://api.github.com/users/apechimp/following{/other_user}","gists_url":"https://api.github.com/users/apechimp/gists{/gist_id}","starred_url":"https://api.github.com/users/apechimp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apechimp/subscriptions","organizations_url":"https://api.github.com/users/apechimp/orgs","repos_url":"https://api.github.com/users/apechimp/repos","events_url":"https://api.github.com/users/apechimp/events{/privacy}","received_events_url":"https://api.github.com/users/apechimp/received_events","type":"User","site_admin":false},"comments":4,"review_comments":0,"commits":4,"additions":92,"deletions":62,"changed_files":3}}