Also ON DELETE RESTRICT On Jun 10, 8:53 am, Thomas Guettler <h...@tbz-pariv.de> wrote: > The documentation says django emulates "ON DELETE CASCADE": > http://docs.djangoproject.com/en/dev/topics/db/queries/#deleting-objects > > But it is missing how to emulate ON DELETE SET NULL. > > In this thread Kevin Howerton posted an abstract base class to emulate ON > DELETE SET NULL. But this does not work if you bulk delete with a query set. > > I opened a new ticket: > > http://code.djangoproject.com/ticket/13731 > > Thomas > > > > > > Russell Keith-Magee wrote: > > On Wed, Jun 9, 2010 at 3:53 AM, Peter Bengtsson <pe...@fry-it.com> wrote: > >> On 8 June 2010 13:09, Jeremy Dunck <jdu...@gmail.com> wrote: > >>> On Tue, Jun 8, 2010 at 7:30 AM, Peter Bengtsson <pete...@gmail.com> wrote: > >>>> I've now had to learn this the hard way by having real live data > >>>> deleted from my database on two production projects and it pisses me > >>>> off big time every time. > > >>>> I can accept that NOT nullable foreign relations cascade the delete > >>>> but not if they have null=True on them. Example: > >>> Actually, this looks to be fixed in 1.2. What version are you > >>> running? Closed ticket (with test cases) here: > >>>http://code.djangoproject.com/ticket/9308 > > >> I'm running Django 1.2.1 so perhaps it's not fixed. > >> Sigh. I have to make a test case to prove it. > > > Looking at Trac, #9308 was fixed in r10822, so it should be fixed in > > 1.1, and it was ported back to 1.0.X as well. > > > We pretty clearly document that our deletion scheme emulates "ON > > DELETE CASCADE"; if you can provide evidence to the contrary, please > > open a ticket. > > > Yours, > > Russ Magee %-) > > -- > Thomas Guettler,http://www.thomas-guettler.de/ > E-Mail: guettli (*) thomas-guettler + de
-- 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.