Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • Thanks for your answer and this gives a new direction and another perspective to look at the current design.I think uniqueness at this point isn't a real constraint and certainly doesn't give competitive advantage nor is it a good economical trade-off. I think that validating the constraint at DB level (unique index) is suffcient and let that exception bubble up to the API exception handler. I also believe that my aggregate design was wrong because of the valid point about concurrent edits. Editing a user doesn't mean invariants of other users should be validated Commented Jan 16, 2019 at 9:31