On Thu, Jun 10, 2010 at 2:53 PM, Thomas Guettler 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 ab
Maybe the documentation is deliberately missing it because it's not
supposed to have to be documented since it's supposed to just work.
But as I'm suspecting, it doesn't.
On 10 June 2010 02:53, Thomas Guettler wrote:
> The documentation says django emulates "ON DELETE CASCADE":
> http://docs.dj
Also ON DELETE RESTRICT
On Jun 10, 8:53 am, Thomas Guettler 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
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
On Wed, Jun 9, 2010 at 3:53 AM, Peter Bengtsson wrote:
> On 8 June 2010 13:09, Jeremy Dunck wrote:
>> On Tue, Jun 8, 2010 at 7:30 AM, Peter Bengtsson 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
On 8 June 2010 13:09, Jeremy Dunck wrote:
> On Tue, Jun 8, 2010 at 7:30 AM, Peter Bengtsson 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 nu
This abstract base class likely is a bit less performant than having
in-db support for cascades in pgsql... though it should give you the
behavior you are seeking.
It should set to default, or null if allowed.
Enjoy.
-k
class ClearOnDelete(models.Model):
def delete(self):
related_obje
On Tue, Jun 8, 2010 at 7:30 AM, Peter Bengtsson 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
Hi,
I think this is the related ticket:
http://code.djangoproject.com/ticket/7539 "Add ON DELETE and ON UPDATE support
to Django"
Me and a lot of other people are on the cc list of this ticket.
Peter Bengtsson wrote:
> I've now had to learn this the hard way by having real live data
> deleted
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:
class Survey(Models):
10 matches
Mail list logo