Dear all,

I have a model with a foreign key with null=True:

    class Many(Model):
        ForeignKey(One, null=True)

    class One(Model):
        pass

Now if I do:

    one = One()

... then:

    one.many_set.all()

... returns all Many's with 'self.one_id == None'.

From an implementational (SQL) standpoint, this seems logical, but from an OO standpoint, it surely doesn't. I would expect an empty queryset as a result, or maybe even some exception. Is the current behavior a (conscious) choice/feature, or a bug?


Cheers, Roald

--
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