Multiple ChoiceHard 45s
Aggregate reference by id
Why should one aggregate reference another aggregate by identity rather than by object reference?
Options
- 1Object references are not serializable. They cannot cross any network boundary. That failure breaks cross-aggregate writes.
- 2Identifiers are always shorter than object pointers. Referencing by id saves memory in the aggregate.
- 3DDD forbids aggregates from collaborating at all. The ban applies however they are referenced.
- 4Holding a direct object reference couples their lifecycles and invites cross-aggregate transactions
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.