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