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

Polymorphic preloads don't work the same as other ones #1035

Open
jwoertink opened this issue May 8, 2024 · 0 comments
Open

Polymorphic preloads don't work the same as other ones #1035

jwoertink opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working hacktoberfest Valid Issue for Hacktoberfest

Comments

@jwoertink
Copy link
Member

def preload_{{ polymorphic_name.id }}
{% for association in associations %}
preload_{{ association.id }}
{% end %}

Normal preloads allow you to pass a block, or override the BaseQuery, but the polymorphic preloads are missing those overloads

def preload_{{ assoc_name }}(preload_query : {{ model }}::BaseQuery) : self

@jwoertink jwoertink added the bug Something isn't working label May 8, 2024
@jwoertink jwoertink added the hacktoberfest Valid Issue for Hacktoberfest label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest Valid Issue for Hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant