public static function doDelete($values, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(RelAlumnoDivisionPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } if ($values instanceof Criteria) { RelAlumnoDivisionPeer::clearInstancePool(); $criteria = clone $values; } elseif ($values instanceof RelAlumnoDivision) { RelAlumnoDivisionPeer::removeInstanceFromPool($values); $criteria = $values->buildPkeyCriteria(); } else { $criteria = new Criteria(self::DATABASE_NAME); $criteria->add(RelAlumnoDivisionPeer::ID, (array) $values, Criteria::IN); foreach ((array) $values as $singleval) { RelAlumnoDivisionPeer::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; } }