Filtering on an annotation returns no reults in sqlite3 when it should return results.
|Reported by:||Owned by:||Martin Matusiak|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||Martin Matusiak||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Creating an annotation which sums through a many to many field, then filtering on that annotation produces no results when results are expected. I have attached a sample app with a test case which reproduces the bug, as well as a test case proving that the raw sql produced by the queryset indeed returns results.
python manage.py test repro.thing
look at repro/thing/tests.py for the code
found on: Ubuntu 12.04.4
django version: 1.6.1
pysqlite version: 2.6.0
libsqlite3-0 version: 3.7.9-2ubuntu1.1
Let me know if I can help!
Change History (10)
comment:2 Changed 3 years ago by
|Cc:||Martin Matusiak added|
|Owner:||changed from nobody to Martin Matusiak|
|Status:||new → assigned|