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 Plugin entities accept a function #906

Closed
michaelbromley opened this issue Jun 1, 2021 · 0 comments
Closed

Make Plugin entities accept a function #906

michaelbromley opened this issue Jun 1, 2021 · 0 comments

Comments

@michaelbromley
Copy link
Member

Is your feature request related to a problem? Please describe.
When defining a plugin, the entities metadata currently expects an array of TypeORM entities. Sometimes a plugin might need to use dynamic logic to determine which entities to define.

Describe the solution you'd like
Change the metadata signature:

- entities?: Array<Type<any>>;
+ entities?: Array<Type<any>> | () => Array<Type<any>>;

Additional context
This is needed for a plugin I'm working on which can be configured by the user to store analytics either in the DB (requiring entities to be defined) or in an external data store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant