{"issue":{"state":"open","created_at":"2011-12-13T15:14:05Z","updated_at":"2011-12-13T17:23:23Z","user":{"gravatar_id":"1f86c0bc40235a9edf351a16b859aabd","id":70800,"url":"https://api.github.com/users/Wilfred","avatar_url":"https://secure.gravatar.com/avatar/1f86c0bc40235a9edf351a16b859aabd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"Wilfred"},"comments":3,"body":"Following discussion on [Django #17337](https://code.djangoproject.com/ticket/17338) ([relevant mailing list thread](http://groups.google.com/group/django-developers/browse_thread/thread/a3d3c5d3bace09a6#msg_b2c0189ec4f7c588)) it looks like we should be able to fix this. Django does not actually depend on the DB for this.\r\n\r\nThe related object deletion seems to happen in `django.db.models.deletion.Collector.collect` but it needs more digging to see what we're missing.","assignee":null,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2537600,"number":1,"title":"Django-nonrel should support cascading deletes","closed_at":null,"html_url":"https://github.com/django-nonrel/django-nonrel/issues/1","url":"https://api.github.com/repos/django-nonrel/django-nonrel/issues/1","milestone":null},"action":"created","comment":{"created_at":"2011-12-13T17:23:23Z","updated_at":"2011-12-13T17:23:23Z","user":{"gravatar_id":"2fbf20786689cefe7606748d16736191","id":134387,"url":"https://api.github.com/users/wkornewald","avatar_url":"https://secure.gravatar.com/avatar/2fbf20786689cefe7606748d16736191?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"wkornewald"},"body":"Cascading deletes are a problem on App Engine because they make deletes in transactions impossible (non-pk queries aren't allowed within transactions). Also, they can be very inefficient at least on App Engine because they can cause a lot of additional queries. That's why we turned them off on NoSQL DBs, for now.\r\n\r\nOur plan was to allow backends to at least move the cascading delete into a background task (i.e. stay compatible, but be more efficient on certain DBs). Although Django now allows to override the delete behavior I don't think that's the real solution because it makes App Engine code (and similarly affected DBs) less reusable with both SQL and other NoSQL DBs. It would be better if you could use exactly the same code on all DBs.","id":3126144,"url":"https://api.github.com/repos/django-nonrel/django-nonrel/issues/comments/3126144"}}