Changes between Version 11 and Version 12 of NoSqlSupport
- Timestamp:
- Apr 27, 2011, 2:28:42 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NoSqlSupport
v11 v12 141 141 This is already implemented in Django-nonrel. 142 142 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 152 143 = Transactions = 153 144