public static function doDelete($values, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(RolResponsablePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } if ($values instanceof Criteria) { RolResponsablePeer::clearInstancePool(); $criteria = clone $values; } elseif ($values instanceof RolResponsable) { RolResponsablePeer::removeInstanceFromPool($values); $criteria = $values->buildPkeyCriteria(); } else { $criteria = new Criteria(self::DATABASE_NAME); $criteria->add(RolResponsablePeer::ID, (array) $values, Criteria::IN); foreach ((array) $values as $singleval) { RolResponsablePeer::removeInstanceFromPool($singleval); } } $criteria->setDbName(self::DATABASE_NAME); $affectedRows = 0; try { $con->beginTransaction(); $affectedRows += BasePeer::doDelete($criteria, $con); $con->commit(); return $affectedRows; } catch (PropelException $e) { $con->rollBack(); throw $e; } }