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

chore: add method to automatically determine the model associations required to be eager loaded for a decorator #621

Merged
merged 1 commit into from Jun 19, 2023

Conversation

bethesque
Copy link
Member

PACT-1070

Inspect the attributes on the decorator class to automatically determine which associations should be eager loaded on the models that will be used to render the response. These will generally be any attributes that are collections, embedded, or nested. For any decorator where this doesn't hold true (due to a mismatch between the way we render the resource, and the way it is stored) then we can overwrite this method (the webhook model+decorator is the pair that springs to mind, as we nest the request object inside the webhook resource, but it doesn't have a separate table in the database).

…ired to be eager loaded for a decorator

PACT-1070
@bethesque bethesque merged commit 65f66ad into master Jun 19, 2023
19 checks passed
@bethesque bethesque deleted the PACT-1070-dashboard-performance-network-diagram-5 branch June 19, 2023 02:34
bethesque added a commit that referenced this pull request Mar 22, 2024
…ired to be eager loaded for a decorator (#621)

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

Successfully merging this pull request may close these issues.

None yet

3 participants