#3275: [patch] select_related() additions (depth=N, fields=[])
------------------------------------------------+---------------------------
   Reporter:  David Cramer <[EMAIL PROTECTED]>  |                Owner:  adrian 
         
     Status:  new                               |            Component:  
Database wrapper
    Version:  SVN                               |           Resolution:         
         
   Keywords:  select_related()                  |                Stage:  
Accepted        
  Has_patch:  1                                 |           Needs_docs:  1      
         
Needs_tests:  1                                 |   Needs_better_patch:  1      
         
------------------------------------------------+---------------------------
Comment (by [EMAIL PROTECTED]):

 There is a bug in the way depth is handled in fill_table_cache, see
 test_depth_bug.diff for a test case.  When you specify a non-zero depth
 fill_table_cache goes one relationship too deep which causes
 get_cached_row not to handle all the columns from select_related.
 
 This bug shows up when you use extra on that QuerySet: the extra fields to
 select should immediately follow columns handled by get_cached_row, but
 instead they get data from the relationship that fill_table_cache added
 and get_cached_row skipped.
 
 See fix_depth_bug.diff for a solution.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3275#comment:15>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to