I want to replicate the behaviour of the $by_category system projection however I’m not getting all the streams I’d expect
This is my user projection:
fromAll()
.when({
$any: function (s, e) {
if(e.streamId !== undefined && e.streamId !== null){
linkTo('$ce-' + e.streamId.split("-")[0], e);
}
}
});
Which works for most events, however it does not catch events created by this second projection:
if (true) {
linkTo('FOO-' + 12345, e);
}
I don’t get a $ce-FOO stream. I assume it’s because the $all filters the links, is that true and if so how can i work around this?
Thanks