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

Version 3 (modified by luke@…, 14 years ago) (diff)

tab = spaces.

The docs clearly show how to insert/update a record, but not how to delete one.

If 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.

If you do not have a reference to the object, simply select to get the record, and dereference it to get the object reference.

def remove(self, recordID):
    myRecord = MyObject.selectBy(id=recordID)
    if myRecord.count():
        myRecord = list(myRecord)[0]
        #Could not find record with that id.

If there are dependencies, you will have to delete the dependent records first (if at all.)

If there is a better way to do this, please update.