Please enable JavaScript.
Coggle requires JavaScript to display documents.
DDD Aggregrates (Small Aggregrates (Value Objects as parts (easier to test…
DDD Aggregrates
-
-
What is it?
-
construct to organize business rules, it's not a meant to be a representation of state
-
-
-
-
-
The root Entity has global identity and is ultimately responsible for checking invariants
Root Entities have global identity. Entities inside the boundary have local identity, unique only within the Aggregate.
Nothing outside the Aggregate boundary can hold a reference to anything inside, except to the root Entity. The root Entity can hand references to the internal Entities to other objects, but they can only use them transiently (within a single method or block).
Only Aggregate Roots can be obtained directly with database queries. Everything else must be done through traversal.
Objects within the Aggregate can hold references to other Aggregate roots.
A delete operation must remove everything within the Aggregate boundary all at once
When a change to any object within the Aggregate boundary is committed, all invariants of the whole Aggregate must be satisfied.