Changes between Version 16 and Version 17 of NonSqlBackends
- Timestamp:
- Aug 13, 2009, 2:08:07 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NonSqlBackends
v16 v17 33 33 == delete() == 34 34 35 model.delete() collects all related objects using _collect_sub_objects(). For non-sql backends this is not always possible, for example, when running in a transaction on App Engine (only entities in the same entity group can be fetched from the datastore). This means that we can't guarantee referential integrity and we can't efficiently emulate SQL in this case. 35 model.delete() collects all related objects using _collect_sub_objects(). For non-sql backends this is not always possible, for example, when running in a transaction on App Engine (only entities in the same entity group can be fetched from the datastore). This means that we can't guarantee referential integrity and we can't efficiently emulate SQL in this case. So model_instance.delete() should only delete the model_instance by calling sql.Query.delete(). This gives backends the flexibility to override sql.Query.delete() and make use of _collet_sub_objects() if desired and possible. 36 36 37 37 = Transactions =