#13935: QuerySet .dates() method should span relationships
---------------------------------------------------+------------------------
          Reporter:  coleifer                      |         Owner:  valyagolev
            Status:  assigned                      |     Milestone:            
         Component:  Database layer (models, ORM)  |       Version:  1.2       
        Resolution:                                |      Keywords:            
             Stage:  Accepted                      |     Has_patch:  1         
        Needs_docs:  0                             |   Needs_tests:  0         
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by anonymous):

 "It seems like there should be some helper" ...I didn't finish that
 phrase.

 What I meant to say is I have been trawling through the Django db classes
 to try and find... there must be some helper method somewhere which
 resolves the field names the 'right' way without having to write our own
 hack code to do so.

 But so far I can't find it.  I figure this ought to be easy for whoever
 wrote the relevant part of the ORM.

 There's this bit of code on compiler.py > SQLCompiler.pre_sql_setup() that
 looks promising:
 {{{
         if (not self.query.select and self.query.default_cols and not
                 self.query.included_inherited_models):
             self.query.setup_inherited_models()
 }}}
 This will never happen for a DateQuery because of this, in subqueries.py >
 DateQuery.add_date_select():
 {{{
     self.select = [select]
 }}}
 Unfortunately I don't know what most of this code really does, there's a
 bit too much going on to take it all in easily.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13935#comment:4>
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-upda...@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