IDDD_Samples
IDDD_Samples copied to clipboard
Question regarding concurrencyVersion
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.
Set it from wherever you gather the business data values to pass in to the aggregate command method.