Can an aggregate root hold references of members of another aggregate root?

Posted by Rushino on Programmers See other posts from Programmers or by Rushino
Published on 2011-02-10T23:08:55Z Indexed on 2011/02/11 15:32 UTC
Read the original article Hit count: 346

Hello,

I know outside aggregates cant change anything inside an aggregate without passing by his root. That said i would like to know if an aggregate root can hold references of members (objects insides) of another aggregate root? (fellowing DDD rules)

Example :

a Calendar contain a list of phases which contain a list of sequences which contain a list of assignations

Calendar is root because phases and sequences and assignations only work in context of a calendar.

You also have Students and Groups of student (called groups)

It is possible (fellowing DDD rules) to make Groups holding references of assignations or it need to pass by the root for accessing groups from assignations ?

Thanks.

© Programmers or respective owner

Related posts about uml

Related posts about domain-driven-design