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

Make entity repository initializer a global initializer #218

Open
2 tasks done
akeemphilbert opened this issue Aug 25, 2022 · 0 comments
Open
2 tasks done

Make entity repository initializer a global initializer #218

akeemphilbert opened this issue Aug 25, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@akeemphilbert
Copy link
Contributor

akeemphilbert commented Aug 25, 2022

Right now the entity repository is an operation initializer. The issue with this is that dispatching commands require an entity repository and if a global initializer requires dispatching a command the entity repository wouldn't be setup. The fix is to make entity repository a global initializer and have a separate operation initializer to INJECT the entity repository into the command based on the schema configuration

  • Create global initializer that loops through the schemas and registers with container
  • Update operation initializer to only inject the configured entity repository
@akeemphilbert akeemphilbert added the enhancement New feature or request label Aug 25, 2022
@akeemphilbert akeemphilbert self-assigned this Aug 25, 2022
akeemphilbert added a commit that referenced this issue Aug 27, 2022
* Setup new global initializer
* Removed unused variable "schema" as it doesn't seem to be used and caused a shadow declaration
* Updated operation initializer to inject registered schema and add to context
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