{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/bookshelf/issues/626","labels_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/626/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/626/comments","events_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/626/events","html_url":"https://github.com/tgriesser/bookshelf/issues/626","id":58111122,"number":626,"title":"Add another event that fires after creating/updating but before saving","user":{"login":"skwee357","id":1651824,"avatar_url":"https://avatars.githubusercontent.com/u/1651824?v=3","gravatar_id":"","url":"https://api.github.com/users/skwee357","html_url":"https://github.com/skwee357","followers_url":"https://api.github.com/users/skwee357/followers","following_url":"https://api.github.com/users/skwee357/following{/other_user}","gists_url":"https://api.github.com/users/skwee357/gists{/gist_id}","starred_url":"https://api.github.com/users/skwee357/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skwee357/subscriptions","organizations_url":"https://api.github.com/users/skwee357/orgs","repos_url":"https://api.github.com/users/skwee357/repos","events_url":"https://api.github.com/users/skwee357/events{/privacy}","received_events_url":"https://api.github.com/users/skwee357/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-18T18:56:10Z","updated_at":"2015-02-18T19:04:28Z","closed_at":"2015-02-18T19:04:28Z","body":"I've read that bookshelf events are un-ordered and sometimes one wants to perform validation and if the model passes validation, perform some before saving manipulations (update slug, dates, whatever). So I propose an events, lets call it \"validating\" that fires just before \"saving\" in order to allow one perform any model validations one might need.\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/tgriesser/bookshelf/issues/comments/74925640","html_url":"https://github.com/tgriesser/bookshelf/issues/626#issuecomment-74925640","issue_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/626","id":74925640,"user":{"login":"bendrucker","id":808808,"avatar_url":"https://avatars.githubusercontent.com/u/808808?v=3","gravatar_id":"","url":"https://api.github.com/users/bendrucker","html_url":"https://github.com/bendrucker","followers_url":"https://api.github.com/users/bendrucker/followers","following_url":"https://api.github.com/users/bendrucker/following{/other_user}","gists_url":"https://api.github.com/users/bendrucker/gists{/gist_id}","starred_url":"https://api.github.com/users/bendrucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendrucker/subscriptions","organizations_url":"https://api.github.com/users/bendrucker/orgs","repos_url":"https://api.github.com/users/bendrucker/repos","events_url":"https://api.github.com/users/bendrucker/events{/privacy}","received_events_url":"https://api.github.com/users/bendrucker/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T19:04:28Z","updated_at":"2015-02-18T19:04:28Z","body":"No plans to add new lifecycle events. If you need granular control over call order you do that from a single event handler that calls other functions. Otherwise order is indeterminate. "}}