Hi,
I started using AbstractAnnotatedAggregateRoot and AbstractAnnotatedEntity
I noticed in the documentation that it is not possible to write
@CommandHandlingMember
private List list;
cfr section 3.3.3:
“Note that each command must have exactly one handler in the aggregate.This means that you cannot annotated multiple entities (either root nor not) with @CommandHandler, when they handle the same command type. This also means that it is not possible to annotate fields containing collections with @CommandHandlingMember
.”
what is the best practice in this case?
- place all commandhandlers in the AR
- place all commandhandlers in a separate class outside the AR
- create a MyEntityList class and place the Commandhandler on this member
any thoughts?
regards,
Chris