Changes between Initial Version and Version 1 of Ticket #16855, comment 15


Ignore:
Timestamp:
Jun 8, 2012, 7:18:01 AM (12 years ago)
Author:
Anssi Kääriäinen

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16855, comment 15

    initial v1  
    11I am afraid that dealing with the case of {{{select_related(depth=1).select_related('genus__family__order')}}} will be a lot more complicated than the patch you have currently.
    22
    3 I would look into trying to turn the select related descents (in db/models/query.py:get_klass_info, db/models/sql/compiler.py:fill_related_selections) into two phase implementations. In the first phase, turn the depth into lookups, in the second phase just add the lookups, and remove the depth arguments from the current descent implementations. Of course, there are numerous ways forward here. Of course, if you spot some easier way, use it instead.
     3I would look into trying to turn the select related descents (in db/models/query.py:get_klass_info, db/models/sql/compiler.py:fill_related_selections) into two phase implementations. In the first phase, turn the depth into lookups, in the second phase just add the lookups, and remove the depth arguments from the current descent implementations. Of course, there are numerous ways forward here. If you spot some easier way, use it instead.
Back to Top