Reputation: 141
I've been getting acquainted with Domain-Driven Design. I'd like to propose an example and from that example ask a couple of questions.
Business requirements:
My intuition directs me to say that a Movement Event does not make sense without a Cargo hence making it an Entity within the Cargo Aggregate Root, but a Movement Event needs to reference a Handler.
So my questions are the following, given that a Movement Event needs to reference a Handler, does that mean that its an Aggregate Root? or can Entities reference other Entities as long as they do not encompass specific rules so they do not qualify as Aggregate Roots? One other thing, if I need to later on query the Movement Event on its own, this qualifies the Movement Event as an Aggregate Root, but for it to get created it, it relies on the Cargo Aggregate Root to make sure that we aren't violating our destination goal rule, so can we reference the Cargo ID and rely on it to handle the business rules?
Upvotes: 0
Views: 71