{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/516","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/516/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/516/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/516","id":63048173,"number":516,"title":"Notify observers for embedded relations","user":{"login":"fabien","id":2749,"avatar_url":"https://avatars.githubusercontent.com/u/2749?v=3","gravatar_id":"","url":"https://api.github.com/users/fabien","html_url":"https://github.com/fabien","followers_url":"https://api.github.com/users/fabien/followers","following_url":"https://api.github.com/users/fabien/following{/other_user}","gists_url":"https://api.github.com/users/fabien/gists{/gist_id}","starred_url":"https://api.github.com/users/fabien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabien/subscriptions","organizations_url":"https://api.github.com/users/fabien/orgs","repos_url":"https://api.github.com/users/fabien/repos","events_url":"https://api.github.com/users/fabien/events{/privacy}","received_events_url":"https://api.github.com/users/fabien/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels/%23review","name":"#review","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-19T17:31:32Z","updated_at":"2015-03-20T06:19:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/516","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/516","diff_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/516.diff","patch_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/516.patch"},"body":"Fixes #497 by triggering `before/after save` and `before/after delete` hooks on the embedded model instance. Because such instances are usually transient, the expected hooks were not called."},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/83925496","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/516#issuecomment-83925496","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/516","id":83925496,"user":{"login":"fabien","id":2749,"avatar_url":"https://avatars.githubusercontent.com/u/2749?v=3","gravatar_id":"","url":"https://api.github.com/users/fabien","html_url":"https://github.com/fabien","followers_url":"https://api.github.com/users/fabien/followers","following_url":"https://api.github.com/users/fabien/following{/other_user}","gists_url":"https://api.github.com/users/fabien/gists{/gist_id}","starred_url":"https://api.github.com/users/fabien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabien/subscriptions","organizations_url":"https://api.github.com/users/fabien/orgs","repos_url":"https://api.github.com/users/fabien/repos","events_url":"https://api.github.com/users/fabien/events{/privacy}","received_events_url":"https://api.github.com/users/fabien/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T06:19:47Z","updated_at":"2015-03-20T06:19:47Z","body":"@bajtos I think I need to review this a bit - obviously, to allow partial updates, `setAttributes` should be called after `before save`. And I believe the hook context should include `data` and `currentInstance` to be consistent."}}