Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 5 and Version 6 of SimpleDelete


Ignore:
Timestamp:
11/15/05 00:59:27 (9 years ago)
Author:
luca
Comment:

More complete example of delete class method.

Legend:

Unmodified
Added
Removed
Modified
  • SimpleDelete

    v5 v6  
    33If you have a reference to the object, simply call object.destroySelf() to remove it from the data base, '''provided it is not a foreign key or has any relationships depending on it.''' 
    44 
    5 If you do not have a reference to the object, simply select use the delete class method: 
    6 MySQLObject.delete(recordId). 
     5If you do not have a reference to the object, simply select use the delete **class method**: 
    76 
    8   ''Are you sure? I get "'SelectResults' object has no attribute 'delete'" --LukeStark'' 
     7{{{ 
     8#!python 
     9class SampleSQLObject(SQLObject): 
     10    # ... 
     11#... 
     12SampleSQLObject.delete(recordId) 
     13}}} 
    914 
    1015If there are dependencies, you will have to delete the dependent records first (if at all.)