src/db/orm/PersistableObject.php
private function doDelete() {
        $db     = $this->db();
        $entity = $this->dao()->getEntityMapping();
        $table  = $entity->getTableName();

        // collect identity infos
        $identity = $entity->getIdentity();
        $idColumn = $identity->getColumn();
        $idValue  = $identity->convertToDBValue($this->getObjectId(), $db);

        // create SQL
        $sql = 'delete from '.$table.'
                   where '.$idColumn.' = '.$idValue;

        // execute SQL and check for concurrent modifications
        if ($db->execute($sql)->lastAffectedRows() != 1)
            throw new ConcurrentModificationException('Error deleting '.get_class($this).' (oid='.$this->getObjectId().'): record not found');
        return true;
    }
private function doDelete() {
        $db     = $this->db();
        $entity = $this->dao()->getEntityMapping();
        $table  = $entity->getTableName();

        // collect identity infos
        $identity = $entity->getIdentity();
        $idColumn = $identity->getColumn();
        $idValue  = $identity->convertToDBValue($this->getObjectId(), $db);

        // create SQL
        $sql = 'delete from '.$table.'
                   where '.$idColumn.' = '.$idValue;

        // execute SQL and check for concurrent modifications
        if ($db->execute($sql)->lastAffectedRows() != 1)
            throw new ConcurrentModificationException('Error deleting '.get_class($this).' (oid='.$this->getObjectId().'): record not found');
        return true;
    }
private function doDelete ( ) { $ db = $ this -> db ( ) ; $ entity = $ this -> dao ( ) -> getEntityMapping ( ) ; $ table = $ entity -> getTableName ( ) ; // collect identity infos $ identity = $ entity -> getIdentity ( ) ; $ idColumn = $ identity -> getColumn ( ) ; $ idValue = $ identity -> convertToDBValue ( $ this -> getObjectId ( ) , $ db ) ; // create SQL $ sql = 'delete from ' . $ table . '
                   where ' . $ idColumn . ' = ' . $ idValue ; // execute SQL and check for concurrent modifications if ( $ db -> execute ( $ sql ) -> lastAffectedRows ( ) != 1 ) throw new ConcurrentModificationException ( 'Error deleting ' . get_class ( $ this ) . ' (oid=' . $ this -> getObjectId ( ) . '): record not found' ) ; return true ; }
Perform the actual deletion of the instance.

@return bool - success status
Perform the actual deletion of the instance .