Opened 18 years ago
Closed 18 years ago
#2885 closed defect (duplicate)
get_cached_row and hence select_related dead loop on circular ForeignKeys
Reported by: | bangcok_dangerus ( at ] hotmail.com | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
select_related fails if there's a loop in ForeignKey relationships. fill_table_cache, which recursively follows ForeignKeys to generate the SQL query, was mentioned as a candidate for this in #2549 . This should now be fixed by the patch in #2874. get_cached_row, which recursively populates objects from the result of the query, suffers from the same problem.
I'll try get a patch up for this at some point.
-Basil
Note:
See TracTickets
for help on using tickets.
duplicate of #3288