You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support.Middleware.Uniqueness module works fine if the only thing that you need to validate is if the command hasn't been dispatched before with a common field name.
But what happens if you dispatch a command to remove something and later you try to create it again with the same value in the unique field? You would get an error, even if the record doesn't exist anymore.
To avoid that it would be great to add a timestamp comparing the dispatched commands in order to avoid comparing commands in long periods of time. At the end of the day, we just need this uniqueness feature to avoid duplicated event creation.
I'm going to try to make the changes and submit a pull request.
The text was updated successfully, but these errors were encountered:
Support.Middleware.Uniqueness
module works fine if the only thing that you need to validate is if the command hasn't been dispatched before with a common field name.But what happens if you dispatch a command to remove something and later you try to create it again with the same value in the unique field? You would get an error, even if the record doesn't exist anymore.
To avoid that it would be great to add a timestamp comparing the dispatched commands in order to avoid comparing commands in long periods of time. At the end of the day, we just need this uniqueness feature to avoid duplicated event creation.
I'm going to try to make the changes and submit a pull request.
The text was updated successfully, but these errors were encountered: