{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/525","labels_url":"https://api.github.com/repos/balderdashy/waterline/issues/525/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/waterline/issues/525/comments","events_url":"https://api.github.com/repos/balderdashy/waterline/issues/525/events","html_url":"https://github.com/balderdashy/waterline/pull/525","id":37748558,"number":525,"title":"create beforeFind lifecycle callback","user":{"login":"aclave1","id":1417877,"avatar_url":"https://avatars.githubusercontent.com/u/1417877?v=3","gravatar_id":"","url":"https://api.github.com/users/aclave1","html_url":"https://github.com/aclave1","followers_url":"https://api.github.com/users/aclave1/followers","following_url":"https://api.github.com/users/aclave1/following{/other_user}","gists_url":"https://api.github.com/users/aclave1/gists{/gist_id}","starred_url":"https://api.github.com/users/aclave1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aclave1/subscriptions","organizations_url":"https://api.github.com/users/aclave1/orgs","repos_url":"https://api.github.com/users/aclave1/repos","events_url":"https://api.github.com/users/aclave1/events{/privacy}","received_events_url":"https://api.github.com/users/aclave1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"particlebanana","id":370260,"avatar_url":"https://avatars.githubusercontent.com/u/370260?v=3","gravatar_id":"","url":"https://api.github.com/users/particlebanana","html_url":"https://github.com/particlebanana","followers_url":"https://api.github.com/users/particlebanana/followers","following_url":"https://api.github.com/users/particlebanana/following{/other_user}","gists_url":"https://api.github.com/users/particlebanana/gists{/gist_id}","starred_url":"https://api.github.com/users/particlebanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/particlebanana/subscriptions","organizations_url":"https://api.github.com/users/particlebanana/orgs","repos_url":"https://api.github.com/users/particlebanana/repos","events_url":"https://api.github.com/users/particlebanana/events{/privacy}","received_events_url":"https://api.github.com/users/particlebanana/received_events","type":"User","site_admin":false},"milestone":null,"comments":38,"created_at":"2014-07-13T20:09:42Z","updated_at":"2015-03-26T20:45:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/balderdashy/waterline/pulls/525","html_url":"https://github.com/balderdashy/waterline/pull/525","diff_url":"https://github.com/balderdashy/waterline/pull/525.diff","patch_url":"https://github.com/balderdashy/waterline/pull/525.patch"},"body":"I created a beforeFind lifecycle callback to allow a user to always modify a model's find or findOne queries with some criteria. A good use case would be if you're using a soft-delete system and you'd like to tack on an isDeleted:false to any find query on a model. Please feel free to critique the code/suggest changes, I tried to stick to the style that already exists."},"comment":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/comments/86708207","html_url":"https://github.com/balderdashy/waterline/pull/525#issuecomment-86708207","issue_url":"https://api.github.com/repos/balderdashy/waterline/issues/525","id":86708207,"user":{"login":"connor4312","id":2230985,"avatar_url":"https://avatars.githubusercontent.com/u/2230985?v=3","gravatar_id":"","url":"https://api.github.com/users/connor4312","html_url":"https://github.com/connor4312","followers_url":"https://api.github.com/users/connor4312/followers","following_url":"https://api.github.com/users/connor4312/following{/other_user}","gists_url":"https://api.github.com/users/connor4312/gists{/gist_id}","starred_url":"https://api.github.com/users/connor4312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connor4312/subscriptions","organizations_url":"https://api.github.com/users/connor4312/orgs","repos_url":"https://api.github.com/users/connor4312/repos","events_url":"https://api.github.com/users/connor4312/events{/privacy}","received_events_url":"https://api.github.com/users/connor4312/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T20:45:06Z","updated_at":"2015-03-26T20:45:06Z","body":"I think that baked-in support for dealing with soft deletes (would be preferable to having lifecycle callbacks, for that particular problem. Any chance of those being roadmapped in 0.11?"}}