There was an error while loading. Please reload this page.
use_query
related_name
Originally posted by numpde January 13, 2023 I have a model Compiled with a foreign key to Module, declared as follows:
parent = models.ForeignKey(Module, ..., related_name="compiled")
With use_query, this fails because it attempts to fetch compiled_set, I believe, due to this line in utils:
compiled_set
prefetch_fields.append(f"{field.name}_set")
Maybe it should be
prefetch_fields.append(field.related_name or f"{field.name}_set")
Discussed in #121
Originally posted by numpde January 13, 2023
I have a model Compiled with a foreign key to Module, declared as follows:
With
use_query, this fails because it attempts to fetchcompiled_set, I believe, due to this line in utils:Maybe it should be