Re: How do you handle cascading deletes in your production apps?

2008-12-10 Thread David Cramer
To be perfectly honest, I'm +1 on a solution. I didn't realize this was happening either. Time to monkey-patch QuerySet's delete() method :) (I'm also a bit curious as to how its handling cascades in MySQL when it's not looping through each object) On Dec 10, 12:43 pm, "Karen Tracey" <[EMAIL PR

Re: How do you handle cascading deletes in your production apps?

2008-12-10 Thread Karen Tracey
On Wed, Dec 10, 2008 at 12:59 PM, AcidTonic <[EMAIL PROTECTED]> wrote: > > There is no anger here sir. I'm a rather sarcastic individual and I > guess there was a good dose there. > > I just cant for the life of me understand why this excellent framework > completely missed the point there. > > Is

Re: How do you handle cascading deletes in your production apps?

2008-12-10 Thread AcidTonic
There is no anger here sir. I'm a rather sarcastic individual and I guess there was a good dose there. I just cant for the life of me understand why this excellent framework completely missed the point there. Is there a workaround that fixes the problem vs working around it? As in a django patch

Re: How do you handle cascading deletes in your production apps?

2008-12-10 Thread Jacob Kaplan-Moss
On Wed, Dec 10, 2008 at 11:05 AM, AcidTonic <[EMAIL PROTECTED]> wrote: > Frankly its as simple as NULLing out the id fields when the object > gets deleted. Thats all I want. Then write a patch and we'll consider it like we do everything else. That's the way open source gets produced: people who n

Re: How do you handle cascading deletes in your production apps?

2008-12-10 Thread AcidTonic
That is great except writing custom queries is quite time consuming considering the simplicity of the problem. Why even have an ORM if I have to write custom code to fix a problem CREATED by the framework. The underlying db doesnt even support cascade! Frankly its as simple as NULLing out the id

Re: How do you handle cascading deletes in your production apps?

2008-12-10 Thread Joey Wilhelm
Zach, You can always run custom delete operations if you want to work around the built in cascading. Take a look at the following example to see how you can do that: http://dpaste.com/92116/ Also, note that there is a ticket to add support for ON UPDATE and ON DELETE clauses to Django[1]. Working

How do you handle cascading deletes in your production apps?

2008-12-10 Thread AcidTonic
Currently the cascading delete functionality requires many users to change how their app works slightly to accommodate this "feature". I'm curious how people are disabling or working around this aspect of django. I've heard many people are implementing custom delete() methods on the model class.

Re: Nipping projects in the butt

2008-12-10 Thread zvoase
By the way, the saying is "Nipping (X) in the bud." It has to do with cutting a flower before it's grown past the bud stage. No butts I'm afraid ;-). On Dec 10, 12:09 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Tue, Dec 9, 2008 at 9:24 PM, Christopher Allan Webber > > > > <[EMAIL PR