Re: non-cascading delete?

2007-04-19 Thread James Bennett
On 4/19/07, Gábor Farkas <[EMAIL PROTECTED]> wrote: > i do not want this. i'd like to find a way, > which TRIES to delete the object, and if not possible > (foreign-key-restrictions), then raises an exception. This really isn't possible right now without doing a lot of hacking around; the problem

Re: non-cascading delete?

2006-09-13 Thread Gary Doades
On Wednesday 13 September 2006 14:41, James Bennett wrote: > I've written about that in a "quick summary" sort of way; you might > want to read it: > http://www.b-list.org/weblog/2006/06/04/lets-talk-about-frameworks-dba-edit >ion Thanks James, a nice "generic" summary. For my part I would summa

Re: Re: non-cascading delete?

2006-09-13 Thread James Bennett
On 9/13/06, Gary Doades <[EMAIL PROTECTED]> wrote: > Database engines such as PostgreSQL and SQLServer etc. have had enormous > amounts of testing, putting huge empahsis on data integrity and > efficiency. I'm not sure why many of the ORMs out there (Django is not > alone in this) presume that tha

Re: non-cascading delete?

2006-09-13 Thread Gary Doades
> > This comes up every once in a while, and every once in a while I post a > link to my solution to this issue from a while back: > > http://code.djangoproject.com/ticket/1007 > > This patch, while it might need some small tweaks to work against > recent trunks, lets you essentially turn this

Re: non-cascading delete?

2006-09-13 Thread Jeff Forcier
This comes up every once in a while, and every once in a while I post a link to my solution to this issue from a while back: http://code.djangoproject.com/ticket/1007 This patch, while it might need some small tweaks to work against recent trunks, lets you essentially turn this behavior off

Re: non-cascading delete?

2006-09-12 Thread Gary Doades
On Tuesday 12 September 2006 23:02, James Bennett wrote: > On 9/12/06, Gary Doades <[EMAIL PROTECTED]> wrote: > > You mean every TYPE of object surely. I'd like to see it list 10 million > > records :) > > Nope. It lists the objects. Ok, I'll be sure to avoid this. > > Even so, if the user selec

Re: Re: non-cascading delete?

2006-09-12 Thread James Bennett
On 9/12/06, Gary Doades <[EMAIL PROTECTED]> wrote: > You mean every TYPE of object surely. I'd like to see it list 10 million > records :) Nope. It lists the objects. The utility of this will vary widely with your use case -- when you have, say, one object which is related to ten million other ob

Re: non-cascading delete?

2006-09-12 Thread gabor
James Bennett wrote: > On 9/12/06, Gary Doades <[EMAIL PROTECTED]> wrote: >> As an example, I have a table (product) that is referenced by 11 other tables >> (booking, history, rates, invoice, payroll, timesheets etc.). Those tables >> contain upwards of 10 million rows in the existing application

Re: non-cascading delete?

2006-09-12 Thread Gary Doades
On Tuesday 12 September 2006 21:30, James Bennett wrote: > There are some checks in place for this; the admin app, for example, > will display a confirmation page before allowing a delete, and that > page lists every related object that will be deleted. You mean every TYPE of object surely. I'd l

Re: Re: non-cascading delete?

2006-09-12 Thread James Bennett
On 9/12/06, Gary Doades <[EMAIL PROTECTED]> wrote: > As an example, I have a table (product) that is referenced by 11 other tables > (booking, history, rates, invoice, payroll, timesheets etc.). Those tables > contain upwards of 10 million rows in the existing application. I certainly > don't want

Re: non-cascading delete?

2006-09-12 Thread Gary Doades
On Tuesday 12 September 2006 10:01, Gábor Farkas wrote: > hi, > > as far as i understand, > > when you delete an object in django, it also deletes all the objects > that reference it. > > is there a way to only delete the object, and get an exception if other > objects reference it? > Oh dear, I

Re: non-cascading delete?

2006-09-12 Thread serbaut
On the same issue: What if you want the database to take care of the cascade? Lets say you have 20,000 references that needs to be deleted, it would be much more efficient with "ON DELETE CASCADE". --~--~-~--~~~---~--~~ You received this message because you are s