IDDD_Samples icon indicating copy to clipboard operation
IDDD_Samples copied to clipboard

Question regarding concurrencyVersion

Open stefanocke opened this issue 9 years ago • 1 comments

Hello,

there is a setter for concurrencyVersion in ConcurrencySafeEntity. But this setter is not called from anywhere. How is it supposed to be used? Shouldn't be the concurrencyVersion contained in every command send to the entity to submit the version the client has seen when reading the aggregat in the first place? If so, what would be the best place to call setConcurrencyVersion? In the application service (or even in the repository) after loading the aggregate or in the entities' methods?

Thanks + Best Regards, Stefan.

stefanocke avatar Oct 04 '14 10:10 stefanocke

Set it from wherever you gather the business data values to pass in to the aggregate command method.

VaughnVernon avatar Oct 06 '14 17:10 VaughnVernon