You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a case when I want to generate ID of aggregate in my service code. But then, somehow I need to return it to client, so it can further interact with that aggregate. Here is a simple example of what I need:
In such configuration, when I call Handle on command service, it will return CardState. Since
The aggregate identity type is only used by the command serviceand for calculating the stream name for loading and saving events.
I will be unaware of this generated Id and thus unable to call for example card charging.
I could generate CardId in command service's code, but hen again I won't be able to load/store aggregate.
What should I do? I don't want the CardId to be generated by client itself. Maybe AggregateId should be accessible through aggregate / aggregate state? What am I missing?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a case when I want to generate ID of aggregate in my service code. But then, somehow I need to return it to client, so it can further interact with that aggregate. Here is a simple example of what I need:
In such configuration, when I call
Handle
on command service, it will returnCardState
. SinceWhat should I do? I don't want the
CardId
to be generated by client itself. MaybeAggregateId
should be accessible through aggregate / aggregate state? What am I missing?Beta Was this translation helpful? Give feedback.
All reactions