mirror of
https://github.com/django/django.git
synced 2025-11-20 11:36:04 +00:00
When prefetching a set of child objects related to a set of parent objects, we usually want to populate the relationship back from the child to the parent to avoid a query when accessing that relationship attribute. However, there's an edge case where the child queryset itself specifies a prefetch back to the parent. In that case, we want to use the prefetched relationship rather than populating the reverse relationship from the parent. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| models.py | ||
| test_prefetch_related_objects.py | ||
| test_uuid.py | ||
| tests.py | ||