Hi all,

given an many_to_one doctests with Reporter/Article models, the
following example would fail with "IntegrityError:
many_to_one_article.reporter_id may not be NULL":

>>> r = Reporter(first_name='John', last_name='Smith', email='j...@example.com')
>>> a = Article(headline="This is a test", pub_date=datetime(2005, 7, 27), 
>>> reporter=r)
>>> r.save()
>>> a.save()

For me, expected behaviour would be that since article knows it is
related to reporter it should check reporter's primary key on save.

Am I wrong?

thanks,
Bojan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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