Re: Re: Populating new aggregates

"Caleb Cushing [email protected] [domaindrivendesign]" <[email protected]> Wed, 09 Sep 2015 16:47:33 +0000
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CAAHKNRGybaK1t-MhgCPOmmoe=xytzGsZmBorOsz4_cMy1wiceA@mail.gmail.com>
>
>
> Hm. Good point. My car example is not real, just the first thing that
> popped into my mind when asking the question. The question was more
> general, and I probably have both in my context, i.e, I have some
> aggregates consisting of only entities and value objects, while others
> consists of other aggregates aswell. So your suggestion is to handle these
> differently?
> 
>

I think if you have complete aggregates within other aggregates then it's
fine if the sub aggregates are not fully loaded on save, as they are
aggregates themselves, and can validate themselves.

 it may also be ok to deal with them by id only, though I think that
decision should be based on ORM and other things like CQRS (maybe the
nested aggregate isn't really even in the same database?).
-- 
Caleb Cushing

http://xenoterracide.com