Code

Changes between Version 16 and Version 17 of NonSqlBackends


Ignore:
Timestamp:
08/13/09 00:08:07 (5 years ago)
Author:
twanschik
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NonSqlBackends

    v16 v17  
    3333== delete() == 
    3434 
    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. 
     35model.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. 
    3636 
    3737= Transactions =