#29579: Objects count after Many to many related query shows wrong
-------------------------------------+-------------------------------------
Reporter: noufalvlpr | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by noufalvlpr):
I am afraid may be its my mistake ..
Steps to reproduce this issue
{{{
s1 = Standard.objects.create(name='standard1')
s2 = Standard.objects.create(name='standard2')
p1 = Product.objects.create(name='product1')
p1.standards.add(s1)
p1.standards.add(s2)
Product.objects.count() # 1
Product.objects.filter(standards__created_at__isnull=True).count() # 2
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29579#comment:3>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.cf3146e0af2fc51b2f16f2d2e3f7684c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.