-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: validate entity and event
aggregate_id
value and type (#80)
#### Why <!-- A short description of why this change is required --> Eventsimple requires both event and entity to specify entity column used as `aggregate_id` in the event. This provides flexibility to use different attribute than primary key to connect event to the entity class. It's possible to accidentally set different value for this attribute. This does not break Eventsimple behaviour, but it introduces unpredictable behaviour when reading event history. It's also possible to accidentally set different type on `event.aggregate_id` column that does not support entity aggregate value type. This breaks Eventsimple behaviour as events cannot be inserted into database. #### What changed <!-- Summary of changes when modifying hundreds of lines --> We added validation that `aggregate_id` argument value and column type matches between event and entity. <!-- Consider adding the following sections: #### How I tested [ Bullets for test cases covered ] #### Next steps [ If your PR is part of a few or a WIP, give context to reviewers ] #### Screenshot [ An image is worth a thousand words ] #### Bug/Ticket tracker [ Unnecessary when prefixing branch with JIRA ticket, e.g. SECURITY-123-human-readable-thing ] -->
- Loading branch information
1 parent
c13dfc5
commit e006a61
Showing
7 changed files
with
113 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Eventsimple | ||
VERSION = '1.5.4' | ||
VERSION = '1.5.5' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters