IT lexicon › Programming › Aggregate Root

Aggregate Root

Programming På svenska → Updated: 2026-05-23

DDD: the single entry point into a cluster of related objects — enforces invariants and atomic updates.

An Order is an aggregate root, OrderLines are its child entities. External callers are not allowed to mutate OrderLines directly — they have to go through Order, which enforces rules ("total cannot exceed credit limit"). A transaction modifies one aggregate at a time. Between aggregates: eventual consistency via domain events. The design comes from Eric Evans's DDD book (2003).

← Back to the lexicon