When using an event-sourced aggregate, the framework uses the so-called AggregateFactory to construct an Aggregate instance.
However, it is only used when there are events present for the aggregate.
Thus, it is not used for making the initial instance.
The fact that it's called the AggregateFactory but isn't used in all scenarios makes it an oddball that causes uncertainty with users.
Either making it the central point for Aggregate creation or replacing it entirely are things to consider.
The chance is high that the predicament around the AggregateFactory will automatically be dealt with in #3070.
Furthermore, pull request #3052 already dropped the use of the AggregateFactory entirely.
Lastly, when working on this ticket, be sure to check if there are pending TODOs referring to the issue number of this issue.
When using an event-sourced aggregate, the framework uses the so-called
AggregateFactory
to construct an Aggregate instance. However, it is only used when there are events present for the aggregate. Thus, it is not used for making the initial instance.The fact that it's called the
AggregateFactory
but isn't used in all scenarios makes it an oddball that causes uncertainty with users. Either making it the central point for Aggregate creation or replacing it entirely are things to consider.The chance is high that the predicament around the
AggregateFactory
will automatically be dealt with in #3070. Furthermore, pull request #3052 already dropped the use of theAggregateFactory
entirely.Lastly, when working on this ticket, be sure to check if there are pending TODOs referring to the issue number of this issue.