[[Aggregate|Aggregates]] group related [[Entity|Entities]] and [[Value Object|Value Objects]], ensuring [[Transactional consistency]], protecting invariants, and enforcing business rules. Each aggregate has a single [[Aggregate Root]], the Entity responsible for managing changes and maintaining data integrity. [[Repository|Repositories]] abstract the persistence logic of Aggregates, and making Aggregate Roots dependent on or reference Repositories violates the [[Separation of Concerns (SoC)]] principle.
Such dependence introduces technical details into the [[Domain Model]], reducing clarity and focus.
Aggregate Roots should be reusable, and coupling them with Repositories compromises that reusability.
By keeping Repositories separate, Aggregate Roots are easier to test, as their behavior remains independent of persistence concerns.
Since the Aggregate Root is an Entity, refer to [[Entities should not depend on or reference Repositories]] for further guidance.