Applying events to IEventStream<T>
does not update the aggregate
#2591
Unanswered
martinothamar
asked this question in
General
Replies: 1 comment
-
@martinothamar That's not a use case that Marten supports. The I'm converting this to a discussion as I don't feel like this is a bug but a feature request for the future. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I have an aggregate/stream where I receive a batch of commands that I wan't to execute against an aggregate in a single transaction. I use the
IEventStream<T>
methods for this. Some commands may be dependent on the result of the previous commands in a single batch, which doesn't work since the aggregate is never updated. If the stream doesn't exist from before (i.e. the command batch element 0 isCreateThing
) thenIEventStream<T>.Aggregate
is always null as weel.I can work around this of course by manually applying events and keeping track of the aggregate outside
IEventStream<T>
(sinceAggregate
property is not settable), but I thought I'd raise an issue since it surprised me a bitBeta Was this translation helpful? Give feedback.
All reactions