Hey all,

Another week's gone by (and remarkably quickly if I do say so myself).
 Since last we spoke I've gotten updates to work, basic filters,
cleaned up some fun messes in the source code, added support for
count(), tests for ForeignKeys, and began investigating more complex
lookup types.  Here we come into the issues I've spoken about earlier.
 Given:

class Group(models.Model):
    id = models.NativeAutoField(primary_key=True)
    name = models.CharField(max_length=255)
    year_formed = models.IntegerField(null=True)

and the query:

Group.objects.exclude(year_formed=1972)

we get the SQL:

SELECT "mongodb_group"."id",
       "mongodb_group"."name",
       "mongodb_group"."year_formed"
FROM "mongodb_group"
WHERE NOT (("mongodb_group"."year_formed" = 1972
            AND NOT ("mongodb_group"."year_formed" IS NULL)))


Not surprising, however the issue is that the IS NULL where clause
gets deep inside the WHERE tree at exclude() time, and MongoDB has no
use for this clause, it has a different semantic for equality with
None.  I'll be investigating sane solutions to this issue in the
coming week, as well as an issue with Aggregates (aggregates are
converted into their backend specific type eagerly, rather than
lazily).

Alex

-- 
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to