#3358: select_related() and selecting by db table fields
------------------------------------------+---------------------------------
Reporter:  dbr <[EMAIL PROTECTED]>  |       Owner:  adrian          
  Status:  new                            |   Component:  Database wrapper
 Version:  0.95                           |    Keywords:                  
   Stage:  Unreviewed                     |   Has_patch:  0               
------------------------------------------+---------------------------------
 (Some of you may be reading this for the second or third time since I
 brought it up both on the django-developers list and IRC)
 
 There appears to be no way to make a query like this through the django
 models without using SQL or hitting the database twice:
 {{{
 SELECT
 trackback.title, blog.name, blog.url
 FROM trackback INNER JOIN blog
 ON trackback.blog_id = blog.id
 }}}
 
 As far as I know, selecting with table fields is preferred above using a
 SELECT * any time possible.
 
 I understand this would break the model object to table row mapping of the
 !QuerySet (objects woulnd't be complete if some fields
 were missing), perhaps a new kind of !QuerySet or !ValueQuerySet is
 needed?
 
 If this is something that would be a welcome addition to the codebase, I
 could probably help out.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3358>
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