{"action":"opened","issue":{"url":"https://api.github.com/repos/bojand/lounge/issues/3","labels_url":"https://api.github.com/repos/bojand/lounge/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/bojand/lounge/issues/3/comments","events_url":"https://api.github.com/repos/bojand/lounge/issues/3/events","html_url":"https://github.com/bojand/lounge/issues/3","id":125638664,"number":3,"title":"Add `EventEmitter` interface to Model constructor to catch events on all instances","user":{"login":"bojand","id":2081100,"avatar_url":"https://avatars.githubusercontent.com/u/2081100?v=3","gravatar_id":"","url":"https://api.github.com/users/bojand","html_url":"https://github.com/bojand","followers_url":"https://api.github.com/users/bojand/followers","following_url":"https://api.github.com/users/bojand/following{/other_user}","gists_url":"https://api.github.com/users/bojand/gists{/gist_id}","starred_url":"https://api.github.com/users/bojand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bojand/subscriptions","organizations_url":"https://api.github.com/users/bojand/orgs","repos_url":"https://api.github.com/users/bojand/repos","events_url":"https://api.github.com/users/bojand/events{/privacy}","received_events_url":"https://api.github.com/users/bojand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-08T16:03:29Z","updated_at":"2016-01-08T16:03:29Z","closed_at":null,"body":"It would be good to be able to do something like this somehow:\r\n\r\n```\r\nvar userSchema = lounge.schema({\r\n  name: String\r\n  email: String\r\n});\r\n\r\nvar User = lounge.model('User', userSchema);\r\n\r\nUser.on('save', function(err, doc) {\r\n  if(err) { \r\n    console.error('error saving User document: ' + err.message);\r\n  }\r\n  else {\r\n    console.log('saved User document: ' + doc.id);\r\n  }\r\n});\r\n```\r\n\r\nAnd similar for other events like `'remove'` and `'index'`."}}