public static function doDelete(Criteria $criteria, PropelPDO $con)
    {
        $db = Propel::getDB($criteria->getDbName());
        $dbMap = Propel::getDatabaseMap($criteria->getDbName());

        //join are not supported with DELETE statement
        if (count($criteria->getJoins())) {
            throw new PropelException('Delete does not support join');
        }

        // Set up a list of required tables (one DELETE statement will
        // be executed per table)
        $tables = $criteria->getTablesColumns();
        if (empty($tables)) {
            throw new PropelException("Cannot delete from an empty Criteria");
        }

        $affectedRows = 0; // initialize this in case the next loop has no iterations.

        foreach ($tables as $tableName => $columns) {

            $whereClause = array();
            $params = array();
            $stmt = null;
            try {
                $sql = $db->getDeleteFromClause($criteria, $tableName);

                foreach ($columns as $colName) {
                    $sb = "";
                    $criteria->getCriterion($colName)->appendPsTo($sb, $params);
                    $whereClause[] = $sb;
                }
                $sql .= " WHERE " . implode(" AND ", $whereClause);

                $stmt = $con->prepare($sql);
                $db->bindValues($stmt, $params, $dbMap);
                $stmt->execute();
                $affectedRows = $stmt->rowCount();
            } catch (Exception $e) {
                Propel::log($e->getMessage(), Propel::LOG_ERR);
                throw new PropelException(sprintf('Unable to execute DELETE statement [%s]', $sql), $e);
            }
        } // for each table

        return $affectedRows;
    }