Re: Aggregate root, factory method and entity as a result

Dariusz Lenartowicz <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>
On 2014-03-08 00:34, Chris Bingham wrote:
>
> Use a typed state machine?
>
> Make the constructor of user require an instance of 
> 'RegisteredTennant' or whatever the your domain names the required state?
>
Can you elaborate on this?

> Otoh, why expose the user at all? It looks like adding a user is part 
> of the Tennant aggregates consistency boundary, so ideally I think 
> you'd keep it as a property/reference on the Tennant itself rather 
> than saving it to a separate repository?
>

Property/reference? What do you mean exactly?

I'm rethinking my model and indeed User should be entity within tenants 
aggregate boundary. Tenant could have Members collection.
But what if my previous statement was true?

Best regards
Darek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.