Malcolm,
Hmm... ok I was running 3.1.3 on OSX (installed via darwinports). I've
upgraded to 3.3.7. Also upgraded pysqlite to the latest in darwinports
(2.0.5). But the tests fail for many_to_one and many_to_many whenever
.count() is used with .distinct().
Specifically:
(many_to_one:)
Reporter.objects.filter(article__headline__startswith='This').distinct().count()
(many_to_many:)
Article.objects.filter(publications__title__startswith="Science").distinct().count()
So I went and had a play with this, and the query that's generated by
Django looks something like:
SELECT COUNT(DISTINCT("tablename"."id")) FROM "tablename"
...which works fine when cut and pasted into SQlite. Tracing it up the
stack, Django's not messing this up, it looks like pysqlite is.
Next step - manually upgraded to pysqlite 2.3.2 (the latest), and still
doesn't work. It's definitely an issue with pysqlite, & I've submitted
a ticket [1]
[1] http://initd.org/tracker/pysqlite/ticket/173
--Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers
-~----------~----~----~----~------~----~------~--~---