We are going to create a real time application with the help of angular-live-set and loopback. However, we would like to monitor changes under specific condition instead of all changes of a model. We found the options.where is described in the loopback document, unfortunately it is implemented.
Hi @mackwan84
I am not sure what do you mean. Could you explain further? Thanks.
If you are having questions about options.where or PresistedModel, Please post questions at https://groups.google.com/forum/#!forum/loopbackjs.
See https://github.com/strongloop/loopback/wiki/Questions for more details.
If you think this is a bug or requesting a feature, I will need more details. Thanks.
Please refer to the official api document: http://apidocs.strongloop.com/loopback/#persistedmodel-createchangestream. For the createChangeStream method, a options.where argument can be used to include only changes of models matching this where filter in the ChangeStream. However, it doesn't work. Thanks.
Thanks for clarifying. Having a look.
I am also experiencing this. The options.where does not seem to actually filter what gets streamed.
Example:
var es = require('event-stream');
module.exports = function(app) {
var Example = app.models.Example;
Example.createChangeStream({where: {id: 2}}, function(err, changes) {
changes.pipe(es.stringify()).pipe(process.stdout);
});
};
Publishes changes for everything changed on the Example model, not just for Example.id == 2
@FreakTheMighty
There seem to be a few related tickets.
https://github.com/strongloop/angular-live-set/issues/11
Any update on a fix?
@gvillenave Please follow up with these issues:
https://github.com/strongloop/angular-live-set/issues/11
A feature request is being made and it will be implemented according to priorities. Thanks
Hi there, do you have any idea of when the options.where filter will be implemented? I have to choose for the right architecture form my prod solution and can't stand listening to thousands objects notifying their status changes instead of few needed events... thank you!
+1
any update on this?
I would also like to use this feature to avoid listening to thousands of objects.
For any still looking for a solution to this see: https://github.com/strongloop/angular-live-set/issues/11 the solution posted there worked perfectly for me with a little massaging.
Simply put, if this feature has not been implemented yet, please don't write it in the official documentation.
As a common sense, official document = implemented + carefully tested
Most helpful comment
Simply put, if this feature has not been implemented yet, please don't write it in the official documentation.
As a common sense, official document = implemented + carefully tested