Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple entity modification with a single command #4

Open
ptitFicus opened this issue Nov 13, 2020 · 3 comments
Open

Support multiple entity modification with a single command #4

ptitFicus opened this issue Nov 13, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ptitFicus
Copy link
Member

In its current state, scribe only allow modification of a single entity with one command.

However there is some event sourcing use case when modification of multiple entity at once is necessary (e.g. bank accounts).

Therefore it would be a good feature to have.

Some rough ideas:

  • replace command entityId by a list

  • allow command handler to return a list of event with differents entityIds

@ptitFicus ptitFicus self-assigned this Nov 13, 2020
@ptitFicus
Copy link
Member Author

Currently it's possible to chain command handler with the same transaction, however it makes the code quite cumbersome.

@ptitFicus
Copy link
Member Author

Another idea would be to pass to the CommandHandler a provider that allow to read a given id. The handler could call this provider with every ids it needs.

@ptitFicus
Copy link
Member Author

#41 is for documenting what's currentlty possible, I keep this one open for a more "user friendly" implementation

@ptitFicus ptitFicus added the enhancement New feature or request label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant