Closed
Description
Discussed in #121
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:
prefetch_fields.append(f"{field.name}_set")
Maybe it should be
prefetch_fields.append(field.related_name or f"{field.name}_set")
Metadata
Metadata
Assignees
Labels
No labels