{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/731","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/731/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/731/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/731/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/731","id":110274831,"number":731,"title":"Unload a element on Operation hook loaded","user":{"login":"FelipeAguayo","id":9990531,"avatar_url":"https://avatars.githubusercontent.com/u/9990531?v=3","gravatar_id":"","url":"https://api.github.com/users/FelipeAguayo","html_url":"https://github.com/FelipeAguayo","followers_url":"https://api.github.com/users/FelipeAguayo/followers","following_url":"https://api.github.com/users/FelipeAguayo/following{/other_user}","gists_url":"https://api.github.com/users/FelipeAguayo/gists{/gist_id}","starred_url":"https://api.github.com/users/FelipeAguayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FelipeAguayo/subscriptions","organizations_url":"https://api.github.com/users/FelipeAguayo/orgs","repos_url":"https://api.github.com/users/FelipeAguayo/repos","events_url":"https://api.github.com/users/FelipeAguayo/events{/privacy}","received_events_url":"https://api.github.com/users/FelipeAguayo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels/feature","name":"feature","color":"bfe5bf"},{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels/triage","name":"triage","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-10-07T17:19:11Z","updated_at":"2015-10-14T15:02:47Z","closed_at":null,"body":"I wish I could unload an item in 'loaded' hook, example:\r\n\r\nresult from datasource: [{id:1, name: 'example'}, {id:2, name: 'example2'}]\r\n\r\n```js\r\nModel.observe('loaded', function (ctx, next, unload){\r\n   if(ctx.instance.id === 2){\r\n     unload();\r\n   }else{\r\n     next();\r\n   }\r\n});\r\n```\r\n\r\nresult for request: [{id:1, name: 'example'}]\r\n\r\nis possible?"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/148077612","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/731#issuecomment-148077612","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/731","id":148077612,"user":{"login":"FelipeAguayo","id":9990531,"avatar_url":"https://avatars.githubusercontent.com/u/9990531?v=3","gravatar_id":"","url":"https://api.github.com/users/FelipeAguayo","html_url":"https://github.com/FelipeAguayo","followers_url":"https://api.github.com/users/FelipeAguayo/followers","following_url":"https://api.github.com/users/FelipeAguayo/following{/other_user}","gists_url":"https://api.github.com/users/FelipeAguayo/gists{/gist_id}","starred_url":"https://api.github.com/users/FelipeAguayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FelipeAguayo/subscriptions","organizations_url":"https://api.github.com/users/FelipeAguayo/orgs","repos_url":"https://api.github.com/users/FelipeAguayo/repos","events_url":"https://api.github.com/users/FelipeAguayo/events{/privacy}","received_events_url":"https://api.github.com/users/FelipeAguayo/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T15:02:47Z","updated_at":"2015-10-14T15:02:47Z","body":"yes, i do."}}