Re: Aggregates with dependencies
Greg Young <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAC9RQtjaMBWJgGTMO2x34E=zk4fXPNDRR=B-+zZr3mo3XfsgoQ@mail.gmail.com> |
I would add the user not as part of the event but as metadata describing the event. It is very common to include context information in metadata (such as security context or machine that did it etc). Greg On Fri, Feb 15, 2013 at 8:49 AM, Mauro Servienti <[email protected]> wrote: > ** > > > Hi all, > > In our domain, financial but does not really care for the topic of the > question, each aggregate raises a lot of events one of the key information > that the event must carry with it is the user, the application user, that > it currently managing the aggregate. > We have a security service that knows who the user is and is the only > source of truth we can rely on. > > Is it fine, from a ddd perspective, that an aggregate depends on a > service? > > If not, how would you solve this scenario? > > .m > > Sent from my Yellow Lumia 920 > > > -- Le doute n'est pas une condition agréable, mais la certitude est absurde.