Re: [Django] #12567: Invalid SQL being generated in certain inheritance cases.

2010-01-10 Thread Django
#12567: Invalid SQL being generated in certain inheritance cases.
---+
  Reporter:  Alex  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
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.




[Django] #12567: Invalid SQL being generated in certain inheritance cases.

2010-01-10 Thread Django
#12567: Invalid SQL being generated in certain inheritance cases.
--+-
 Reporter:  Alex  |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Given the models

 {{{
 from django.db import models

 class A(models.Model):
 pass

 class B(A):
pass

 class C(A):
pass
 }}}

 The query:
 {{{
 >>> A.objects.filter(b__isnull=False)
 }}}

 Generates bad SQL (specifically it omits the needed join).  Worth noting
 that:
 {{{
 >>> A.objects.exclude(b=None)
 }}}

 works correctly.

-- 
Ticket URL: 
Django 
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.