Re: Deleting an object deletes objects with nullable foreignkeys pointing at it

2009-07-27 Thread mrts
On Jul 27, 10:34 pm, Stephen Sundell wrote: > 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? http://code.djangoproject.com/ticket

Re: Deleting an object deletes objects with nullable foreignkeys pointing at it

2009-07-27 Thread Forest Bond
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(

Deleting an object deletes objects with nullable foreignkeys pointing at it

2009-07-27 Thread Stephen Sundell
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