#10733: Invalid results when deferring fields in more than one related model 
with
only()
---------------------------------------------------+------------------------
          Reporter:  mrts                          |         Owner:  adurdin    
    
            Status:  assigned                      |     Milestone:  1.1        
    
         Component:  Database layer (models, ORM)  |       Version:  SVN        
    
        Resolution:                                |      Keywords:  
efficient-admin
             Stage:  Accepted                      |     Has_patch:  1          
    
        Needs_docs:  0                             |   Needs_tests:  0          
    
Needs_better_patch:  1                             |  
---------------------------------------------------+------------------------
Changes (by adurdin):

  * needs_better_patch:  0 => 1
  * has_patch:  0 => 1

Comment:

 The fault is in `django/models/query.py:get_cached_row()`:  when it
 recurses it was not passing the `only_load` dict down the stack. The
 attached patch fixes this.

 However I noticed that the recursion is not passing anything for the
 `offset` parameter, which is to do with aggregation queries.  I can't say
 for sure at the moment, but it looks to me like an additional bug relating
 to aggregated queries with related models could be hiding in here as well.
 Or is the `offset` parameter '''only''' relevant to the top-level model?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10733#comment:9>
Django <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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to