Skip to content

makeWishAggregateVersion and more than 3 wishes #24

@mcrio

Description

@mcrio

Hi, thank you for the book. Just reading through the chapters.

In the book it was mentioned that there is a possibility that we end up with 3+ wishes in a rare case of parallel requests, although the business rule states there shouldn't be more than 3 wishes.

By moving the business logic to the user domain entity we do keep the logic in the domain which seems correct, but does it solve the problem above?

Also if the problem is to be solved somehow at the persistence layer, there the issue does not seem obvious without looking at the domain logic?

Maybe I'm missing something :)

https://github.com/dddinphp/last-wishes/blob/47cf7c5950734d8d90cd405432d5d20b2c897df3/src/Lw/Application/Service/Wish/AggregateVersion/AddWishService.php#L15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions