src/flowcode/ceibo/support/DaoSupport.php
public function buildDeleteQuery($entity) {
        $mapper = MapperBuilder::buildFromMapping($this->mapping, get_class($entity));
        $query = "";
        foreach ($mapper->getRelations() as $relation) {
            $query .= $this->buildDeleteRelationQuery($relation, $entity);
        }

        $query .= "DELETE FROM " . $mapper->getTable() . " ";
        $query .= "WHERE id = '" . $entity->getId() . "';";

        return $query;
    }
public function buildDeleteQuery($entity) {
        $mapper = MapperBuilder::buildFromMapping($this->mapping, get_class($entity));
        $query = "";
        foreach ($mapper->getRelations() as $relation) {
            $query .= $this->buildDeleteRelationQuery($relation, $entity);
        }

        $query .= "DELETE FROM " . $mapper->getTable() . " ";
        $query .= "WHERE id = '" . $entity->getId() . "';";

        return $query;
    }
public function buildDeleteQuery ( $ entity ) { $ mapper = MapperBuilder :: buildFromMapping ( $ this -> mapping , get_class ( $ entity ) ) ; $ query = "" ; foreach ( $ mapper -> getRelations ( ) as $ relation ) { $ query .= $ this -> buildDeleteRelationQuery ( $ relation , $ entity ) ; } $ query .= "DELETE FROM " . $ mapper -> getTable ( ) . " " ; $ query .= "WHERE id = '" . $ entity -> getId ( ) . "';" ; return $ query ; }
Build a delete query for an entity.
@param type $entity
@return string
Build a delete query for an entity .