dolittle / Bifrost

This is the stable release of Dolittle till its out of alpha->beta stages
Other
110 stars 32 forks source link

AggregateRootRepository should have support for a method called Exists() #53

Closed einari closed 11 years ago

smithmx commented 11 years ago

Shouldn't this be done via validation?

einari commented 11 years ago

Validation?

I guess the use case for something like this is for CommandHandlers to check if something exists and then decide to do one thing over the other.. Thats what the use case for Holte was at least.

smithmx commented 11 years ago

I thought they just wanted to confirm the aggregate existed before performing actions on it, hence business validation.

Creating something then performing an action on it as opposed to performing the action on an existing instance sounds like two different commands to me. Design aside, if you want to know something about the state of the system, ask the read side.

On Wednesday, February 27, 2013, Einar Ingebrigtsen wrote:

Validation?

I guess the use case for something like this is for CommandHandlers to check if something exists and then decide to do one thing over the other.. Thats what the use case for Holte was at least.

— Reply to this email directly or view it on GitHubhttps://github.com/dolittle/Bifrost/issues/53#issuecomment-14180667 .

einari commented 11 years ago

Totally agree and I've been hesitant to implement this as I don't really understand the business case for it. So I'm inclined to close this and just leave it till a real business case is presented for it