What Belongs to the Aggregate Root

Posted by jlembke on Stack Overflow See other posts from Stack Overflow or by jlembke
Published on 2009-05-07T18:52:00Z Indexed on 2010/04/01 7:03 UTC
Read the original article Hit count: 331

Filed under:
|
|
|

This is a practical Domain Driven Design question:

Conceptually, I think I get Aggregate roots until I go to define one.

I have an Employee entity, which has surfaced as an Aggregate root. In the Business, some employees can have work-related Violations logged against them:

Employee-----*Violations

Since not all Employees are subject to this, I would think that Violations would not be a part of the Employee Aggregate, correct?

So when I want to work with Employees and their related violations, is this two separate Repository interactions by some Service?

Lastly, when I add a Violation, is that method on the Employee Entity? Thanks for the help!

© Stack Overflow or respective owner

Related posts about ddd

Related posts about aggregate