{"action":"created","issue":{"url":"https://api.github.com/repos/jedireza/hapi-mongo-models/issues/27","labels_url":"https://api.github.com/repos/jedireza/hapi-mongo-models/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/jedireza/hapi-mongo-models/issues/27/comments","events_url":"https://api.github.com/repos/jedireza/hapi-mongo-models/issues/27/events","html_url":"https://github.com/jedireza/hapi-mongo-models/issues/27","id":106388454,"number":27,"title":"Hooks support","user":{"login":"prashaantt","id":390540,"avatar_url":"https://avatars.githubusercontent.com/u/390540?v=3","gravatar_id":"","url":"https://api.github.com/users/prashaantt","html_url":"https://github.com/prashaantt","followers_url":"https://api.github.com/users/prashaantt/followers","following_url":"https://api.github.com/users/prashaantt/following{/other_user}","gists_url":"https://api.github.com/users/prashaantt/gists{/gist_id}","starred_url":"https://api.github.com/users/prashaantt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashaantt/subscriptions","organizations_url":"https://api.github.com/users/prashaantt/orgs","repos_url":"https://api.github.com/users/prashaantt/repos","events_url":"https://api.github.com/users/prashaantt/events{/privacy}","received_events_url":"https://api.github.com/users/prashaantt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jedireza/hapi-mongo-models/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-14T17:15:39Z","updated_at":"2015-09-14T19:43:12Z","closed_at":null,"body":"This looks like just the project I was looking for. Joi is awesome and it's great that you're using that.\r\n\r\nDo you support pre and post hooks? I couldn't find any references to that in the docs. If not, is it anywhere on the roadmap?"},"comment":{"url":"https://api.github.com/repos/jedireza/hapi-mongo-models/issues/comments/140186493","html_url":"https://github.com/jedireza/hapi-mongo-models/issues/27#issuecomment-140186493","issue_url":"https://api.github.com/repos/jedireza/hapi-mongo-models/issues/27","id":140186493,"user":{"login":"jedireza","id":979929,"avatar_url":"https://avatars.githubusercontent.com/u/979929?v=3","gravatar_id":"","url":"https://api.github.com/users/jedireza","html_url":"https://github.com/jedireza","followers_url":"https://api.github.com/users/jedireza/followers","following_url":"https://api.github.com/users/jedireza/following{/other_user}","gists_url":"https://api.github.com/users/jedireza/gists{/gist_id}","starred_url":"https://api.github.com/users/jedireza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedireza/subscriptions","organizations_url":"https://api.github.com/users/jedireza/orgs","repos_url":"https://api.github.com/users/jedireza/repos","events_url":"https://api.github.com/users/jedireza/events{/privacy}","received_events_url":"https://api.github.com/users/jedireza/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T19:43:12Z","updated_at":"2015-09-14T19:43:12Z","body":"Oh I see. This hasn't come up before. We don't have models in the sense that you'd change instance data and call a `save` method, although you could create a `save` method in your own models. Also keep in mind that we're not validating against the schema when creating or updating records, that's up to you to use.\r\n\r\nMy initial thoughts are;\r\n\r\n - we don't have any existing life cycle events or extension points today\r\n - since you're already creating a model for each collection, if you want to get in between (pre/post) of a call, you could overwrite some method in your model and proxy the call to mongo directly."}}