{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback/issues/2140","repository_url":"https://api.github.com/repos/strongloop/loopback","labels_url":"https://api.github.com/repos/strongloop/loopback/issues/2140/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback/issues/2140/comments","events_url":"https://api.github.com/repos/strongloop/loopback/issues/2140/events","html_url":"https://github.com/strongloop/loopback/issues/2140","id":140315404,"number":2140,"title":"Custom script doesn't seem to affect the ChangeStream","user":{"login":"alexxgathp","id":10504091,"avatar_url":"https://avatars.githubusercontent.com/u/10504091?v=3","gravatar_id":"","url":"https://api.github.com/users/alexxgathp","html_url":"https://github.com/alexxgathp","followers_url":"https://api.github.com/users/alexxgathp/followers","following_url":"https://api.github.com/users/alexxgathp/following{/other_user}","gists_url":"https://api.github.com/users/alexxgathp/gists{/gist_id}","starred_url":"https://api.github.com/users/alexxgathp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexxgathp/subscriptions","organizations_url":"https://api.github.com/users/alexxgathp/orgs","repos_url":"https://api.github.com/users/alexxgathp/repos","events_url":"https://api.github.com/users/alexxgathp/events{/privacy}","received_events_url":"https://api.github.com/users/alexxgathp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback/labels/triage","name":"triage","color":"eb6420"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/waiting","name":"waiting","color":"eeeeee"}],"state":"closed","locked":false,"assignee":{"login":"richardpringle","id":3286504,"avatar_url":"https://avatars.githubusercontent.com/u/3286504?v=3","gravatar_id":"","url":"https://api.github.com/users/richardpringle","html_url":"https://github.com/richardpringle","followers_url":"https://api.github.com/users/richardpringle/followers","following_url":"https://api.github.com/users/richardpringle/following{/other_user}","gists_url":"https://api.github.com/users/richardpringle/gists{/gist_id}","starred_url":"https://api.github.com/users/richardpringle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardpringle/subscriptions","organizations_url":"https://api.github.com/users/richardpringle/orgs","repos_url":"https://api.github.com/users/richardpringle/repos","events_url":"https://api.github.com/users/richardpringle/events{/privacy}","received_events_url":"https://api.github.com/users/richardpringle/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-03-11T23:12:36Z","updated_at":"2016-03-14T21:33:19Z","closed_at":"2016-03-14T21:33:19Z","body":"I have a standalone custom script that I run while the loopback server is running, where I do a find and an updateAll to a model, but it does not send the change to the liveset / changestream.\r\n\r\nI'm accessing the models, etc, following this example:\r\nhttps://docs.strongloop.com/display/public/LB/Working+with+LoopBack+objects#WorkingwithLoopBackobjects-Fromacustomscript\r\nOriginally, I posted it to angular-live-set, but realized it really belongs where the changestream code is.\r\nhttps://github.com/strongloop/angular-live-set/issues/18\r\n```javascript\r\nvar server = require(\"../../server/server\");\r\nserver.models.Mymodel.find(...\r\nserver.models.Mymodel.updateAll(...\r\n\r\n// Then, it does not show up in the ChangeStream, and consequently the LiveSet. However, the loopback explorer does affect the changestream and its changes show.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback/issues/comments/196530437","html_url":"https://github.com/strongloop/loopback/issues/2140#issuecomment-196530437","issue_url":"https://api.github.com/repos/strongloop/loopback/issues/2140","id":196530437,"user":{"login":"alexxgathp","id":10504091,"avatar_url":"https://avatars.githubusercontent.com/u/10504091?v=3","gravatar_id":"","url":"https://api.github.com/users/alexxgathp","html_url":"https://github.com/alexxgathp","followers_url":"https://api.github.com/users/alexxgathp/followers","following_url":"https://api.github.com/users/alexxgathp/following{/other_user}","gists_url":"https://api.github.com/users/alexxgathp/gists{/gist_id}","starred_url":"https://api.github.com/users/alexxgathp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexxgathp/subscriptions","organizations_url":"https://api.github.com/users/alexxgathp/orgs","repos_url":"https://api.github.com/users/alexxgathp/repos","events_url":"https://api.github.com/users/alexxgathp/events{/privacy}","received_events_url":"https://api.github.com/users/alexxgathp/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T21:33:18Z","updated_at":"2016-03-14T21:33:18Z","body":"Ah, I see. I assumed it was making calls to the REST API, but I see it was processing it as if it was the first instance.\r\n\r\nI'll try one of those other ways. Thanks!\r\n\r\n"}}