Opened 16 years ago

Closed 16 years ago

#2885 closed defect (duplicate)

get_cached_row and hence select_related dead loop on circular ForeignKeys

Reported by: bangcok_dangerus ( at ] 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


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.


Change History (1)

comment:1 Changed 16 years ago by mir@…

Resolution: duplicate
Status: newclosed

duplicate of #3288

Note: See TracTickets for help on using tickets.
Back to Top