DDD modeling, interactions between aggregate roots

alt text Marked my common roots 1, 2; 3. It looks good - almost like grapes.

alt text

A thing I don't like is an object marked with a red arrow.

Let's pretend that:

  • AR # 1 - company
  • AR # 2 - office.
  • AR # 3 is an employee
  • The object marked with a red arrow is called Country
    • The company establishes rules from which the countries that hire employees (when hired, company.Countries.Contains(employee.Country)must be true)

I somehow see this rather inconsequential part of the domain (maybe it doesn’t look like in this example), and I would like to avoid moving the country to unite root.

The Common Roots Glossary says:

Temporary references to internal members may only be transferred for use in a single operation.

- - "EmployeeCountry", , Employee, - , ?

?

, ?

+5
1

Country - , - - - ( ).

, , , , , . , . , - .

Evans ", " (a.k.a., "" "). , . . 127 ( ), , Engine.

+7

All Articles