A simple "None=True" should work.

Thanks,
Subhranath Chunder.

On Sun, Jul 18, 2010 at 11:25 PM, rmschne <rmsc...@gmail.com> wrote:

> I have two tables where one is a foreign key for the other. For some
> of the "children" there is no "parent".  Hence I want to leave the
> linking field NULL (empty) in the child database table.  I am having
> trouble making a queryset which finds all children without parents.  I
> was thinking looking for the linking field to be <1 or None or
> something.  Not working.  I'm thinking that it is because Django
> cannot allow a child record to no have a parent when their a foreign
> key defined?
>
> I'm not using Django, yet, to put data into the database, so there are
> children with no parents in the database.  This makes sense for the
> purpose of the application, but I can't get Django to tell me which
> children have no parents.
>
> Thoughts?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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

Reply via email to