Can an aggregate root hold references of members of another aggregate root?
- by Rushino
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.