Changes between Version 11 and Version 12 of NoSqlSupport


Ignore:
Timestamp:
04/27/2011 02:28:42 AM (4 years ago)
Author:
wkornewald
Comment:

cascading deletes are probably fine because now ForeignKey allows to override that behavior

Legend:

Unmodified
Added
Removed
Modified
  • NoSqlSupport

    v11 v12  
    141141This is already implemented in Django-nonrel.
    142142
    143 
    144 = Model.delete() =
    145 
    146 By default, on `Model.delete()` Django emulates `ON DELETE CASCADE`. On App Engine this is not possible because queries are disabled while running a transaction. Even without transactions this can be very inefficient on App Engine, SimpleDB, and other NoSQL DBs because Django has to run a lot of queries and retrieve a lot of model instance. Even worse, since this operation is so inefficient it can be absolutely impossible to retrieve all related entities if there are significantly more than 1000 entities (on GAE the 1000 results limit has been removed, but it's still not possible to retrieve e.g. 5000 results).
    147 
    148 It should be possible for backends to override cascading deletes (e.g. on App Engine the backend might distribute the deletion across background tasks to handle the load).
    149 
    150 For now, in Django-nonrel cascading deletes are completely disabled. This obviously is not a good long-term solution.
    151 
    152143= Transactions =
    153144
Back to Top