public static function doDelete($values, $con = null) { if ($con === null) { $con = Propel::getConnection(ReligionPeer::DATABASE_NAME); } if ($values instanceof Criteria) { $criteria = clone $values; } elseif ($values instanceof Religion) { $criteria = $values->buildPkeyCriteria(); } else { $criteria = new Criteria(self::DATABASE_NAME); $criteria->add(ReligionPeer::ID, (array) $values, Criteria::IN); } $criteria->setDbName(self::DATABASE_NAME); $affectedRows = 0; try { $con->begin(); $affectedRows += ReligionPeer::doOnDeleteCascade($criteria, $con); $affectedRows += BasePeer::doDelete($criteria, $con); $con->commit(); return $affectedRows; } catch (PropelException $e) { $con->rollback(); throw $e; } }