Lets say I have
aggregate root A which has entity B
aggregate root C which has entity D
I've read that best practice is to hold object Id inside aggregate roots instead of direct references, for example A->C_Id and C->A_Id.
- can aggregate hold Id of entity in separate aggregate? Like A->D_Id and C->B_Id?
- can one aggregate root instantiate another aggregate root? Like A instantiate C and vice versa?
- can aggregate A instantiate new instances of entities stored in separate aggregates? Like A attempts to instantiate D or C attempts instantiating B?
- can aggregates and/or entities methods take as arguments direct references of entities from other aggregates, provided that they will not store direct references after method exit? Like A->method(D) or B->method(C)