"there is a relationship between entities across aggregates, which should not happen" - that's not quite right. What DDD enforces is going through the aggregate root; it says that you shouldn't be able to directly change an entity in a different aggregate (circumventing the root), and that you shouldn't be able to obtain a non-transient reference to such an entity. It doesn't say there cannot be relationships (other than variable-based references) between entities, or between duplicate copies of entities. By making your choice of aggregates, you're deciding how and when to keep these in sinc.
↧