Let’s say we have a simple data structure:
Both, Interface
and Network Printer
have EndPoint
, which is stored in the different table (with FKs enforced). For example, Interface
requires EndPoint’s
port numbers be between: 1000-2000 and Network Printer
requires port numbers between: 2000-3000. It makes me think that EndPoint
can’t be an aggregate root as we don't really need direct access to it and we don’t want directly change endpoint values without knowing its context. Per this post: if something belongs to one aggregate, then other aggregates might refer it as a read-only data. Does mean that EndPoint
can’t belong to Interface
and Network Printer
? Or it still can, as in my case, the same EndPoint
instance is never shared between the two aggregates. So Interface
and Network Pritner
always will be updating its own EndPoint
and no consistency violation will happen? Sounds right?