Hi, On Mon, Jul 27, 2009 at 12:34:22PM -0700, Stephen Sundell wrote: > I have revision 10865, and use postgresql. I've noticed that with > models like this: > > class Edition(models.Model): > name = models.CharField(max_length=25) > > class Email(models.Model) > edition = models.ForeignKey(Edition,null=True,blank=True) > > If I delete an edition (edition.delete()), it deletes all the emails > associated with it. I thought it was just supposed to set the foreign > key to null. Am I wrong in my thinking or doing something incorrect?
You must set the foreign key fields to NULL manually before deleting. -Forest -- Forest Bond http://www.alittletooquiet.net http://www.pytagsfs.org
signature.asc
Description: Digital signature
