Hi,
How can I prevent the following things in a projections:
a) A linkTo is done to a hard deleted stream (puts the projection in a faulted state at startup).
b) A linkTo is made for an event that is part of a hard deleted stream (I only want undeleted events in the stream created by the projection).
Scavenge has been run, but they are in the active chunk.
fromAll()
.when({
$any: function (state, ev) {
if (ev
&& ev.eventType && !ev.eventType.startsWith('$')
&& ev.metadata && ev.metadata.tenant_code
) {
linkTo(ev.metadata.tenant_code + '.TenantEvents', ev);
}
return null;
}
});
Kind regards