Closed edro closed 6 years ago
Are you making a bigger redesign in your domain and you need to handle a command on a new aggregate? i.e. merging 2 event streams into a new aggragate?
I'd like to convert an input command payload using of an external service to a new aggregateId. For example: domain command contains phone number (car plate, tag etc.) in in an arbitrary manner, but i need to build (or get) aggrgate using that number as aggregate identity.
Isn't defineCommandAwareAggregateIdGenerator
suitable for your use case?
Thank You. Partially yes. But in this case I will have to check every command name and change id generator behavior on specific command data. I think this must be closer to specific command definition.
there's always the possibility to define an own command handler => https://github.com/adrai/node-cqrs-domain#command-handler-be-careful
defineEventStreamsToLoad throws exception "No event stream found for evt with id:..." when eventstream with requested aggregateId does not not exist in eventstore before. Expectation - creating new eventstream with this aggregateId