Multiple ChoiceHard 45s
Unit of Work and aggregate boundaries
A Unit of Work accumulates changes across several aggregates. Why is committing them in one transaction often wrong in DDD?
Options
- 1Unit of Work is deprecated. It should never span more than one repository. A transaction may touch only one repository.
- 2An aggregate is the consistency boundary; spanning aggregates in one transaction couples them and fights concurrency
- 3A transaction must contain exactly one INSERT. Nothing else may appear in that transaction. Multiple statements are therefore forbidden.
- 4Unit of Work needs exactly one repository. A second repository breaks its bookkeeping. The unit tracks only one repository.
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.