feat: add epoch event stream to aggregate id
This commit is contained in:
@@ -19,6 +19,7 @@ export function makeAggregateReducer<
|
||||
},
|
||||
reduce(events: TEventFactory["$events"][number]["$record"][], snapshot?: Unknown) {
|
||||
const instance = aggregate.from(store, snapshot);
|
||||
instance.id = events[0].stream;
|
||||
for (const event of events) {
|
||||
instance.with(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user