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
othercodes edited this page Jan 2, 2023
·
5 revisions
Aggregates
Aggregate is a cluster of domain objects that can be treated as a single unit.
-- Martin Fowler
Creating a Value Object is quite easy you only need to use the Trait IsAggregate this will
add the HasAttributes, HasInvariants, HasDomainEvents, HasIdentity and HasEquality Traits.
In addition, you could use the Aggregate interface to expose the publishDomainEvents method.
The following example illustrates the implementation of these components.