本文整理汇总了PHP中BasePeer::doDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP BasePeer::doDelete方法的具体用法?PHP BasePeer::doDelete怎么用?PHP BasePeer::doDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasePeer
的用法示例。
在下文中一共展示了BasePeer::doDelete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doDelete
public static function doDelete(Criteria $criteria, $connection = null)
{
if (!isset($connection)) {
$connection = QubitTransactionFilter::getConnection(QubitOaiHarvest::DATABASE_NAME);
}
$affectedRows = 0;
$affectedRows += BasePeer::doDelete($criteria, $connection);
return $affectedRows;
}
示例2: testDoDelete
public function testDoDelete()
{
try {
$c = new Criteria();
$c->setPrimaryTableName(BookPeer::TABLE_NAME);
$c->add(BookPeer::ID, 12, ' BAD SQL');
BasePeer::doDelete($c, Propel::getConnection());
} catch (PropelException $e) {
$this->assertContains('[DELETE FROM `book` WHERE book.ID BAD SQL:p1]', $e->getMessage(), 'SQL query is written in the exception message');
}
}
示例3: doForceDelete
/**
* Performs a DELETE on the database, given a AbsenceEleveTraitement or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or AbsenceEleveTraitement object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doForceDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(AbsenceEleveTraitementPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// rename for clarity
$criteria = clone $values;
} elseif ($values instanceof AbsenceEleveTraitement) { // it's a model object
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(AbsenceEleveTraitementPeer::ID, (array) $values, Criteria::IN);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
// cloning the Criteria in case it's modified by doSelect() or doSelectStmt()
$c = clone $criteria;
$affectedRows += AbsenceEleveTraitementPeer::doOnDeleteCascade($c, $con);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
if ($values instanceof Criteria) {
AbsenceEleveTraitementPeer::clearInstancePool();
} elseif ($values instanceof AbsenceEleveTraitement) { // it's a model object
AbsenceEleveTraitementPeer::removeInstanceFromPool($values);
} else { // it's a primary key, or an array of pks
foreach ((array) $values as $singleval) {
AbsenceEleveTraitementPeer::removeInstanceFromPool($singleval);
}
}
$affectedRows += BasePeer::doDelete($criteria, $con);
AbsenceEleveTraitementPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
}
示例4: doDelete
/**
* Method perform a DELETE on the database, given a Role or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or Role object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(RolePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
RolePeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
} elseif ($values instanceof Role) {
// invalidate the cache for this single object
RolePeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(RolePeer::ID, (array) $values, Criteria::IN);
foreach ((array) $values as $singleval) {
// we can invalidate the cache for this single object
RolePeer::removeInstanceFromPool($singleval);
}
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0;
// initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
$affectedRows += RolePeer::doOnDeleteCascade($criteria, $con);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
if ($values instanceof Criteria) {
RolePeer::clearInstancePool();
} else {
// it's a PK or object
RolePeer::removeInstanceFromPool($values);
}
$affectedRows += BasePeer::doDelete($criteria, $con);
// invalidate objects in EmployeePeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.
EmployeePeer::clearInstancePool();
// invalidate objects in UserPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.
UserPeer::clearInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
}
示例5: doDelete
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TipodocentePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
TipodocentePeer::clearInstancePool();
$criteria = clone $values;
} elseif ($values instanceof Tipodocente) {
TipodocentePeer::removeInstanceFromPool($values);
$criteria = $values->buildPkeyCriteria();
} else {
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(TipodocentePeer::ID, (array) $values, Criteria::IN);
foreach ((array) $values as $singleval) {
TipodocentePeer::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;
}
}
示例6: doDelete
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(VCourseDayPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values;
} elseif ($values instanceof VCourseDay) {
$criteria = $values->buildCriteria();
} else {
$criteria = new Criteria(self::DATABASE_NAME);
if (count($values) == count($values, COUNT_RECURSIVE)) {
$values = array($values);
}
$vals = array();
foreach ($values as $value) {
}
}
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0;
try {
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
示例7: doDelete
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(VSubjectAgendaPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values;
} elseif ($values instanceof VSubjectAgenda) {
$criteria = $values->buildPkeyCriteria();
} else {
$criteria = new Criteria(self::DATABASE_NAME);
if (count($values) == count($values, COUNT_RECURSIVE)) {
$values = array($values);
}
$vals = array();
foreach ($values as $value) {
$vals[0][] = $value[0];
$vals[1][] = $value[1];
$vals[2][] = $value[2];
$vals[3][] = $value[3];
}
$criteria->add(VSubjectAgendaPeer::COURSE_SCHEDULE_ID, $vals[0], Criteria::IN);
$criteria->add(VSubjectAgendaPeer::CLASS_GROUP_ID, $vals[1], Criteria::IN);
$criteria->add(VSubjectAgendaPeer::SUBJECT_CURR_ID, $vals[2], Criteria::IN);
$criteria->add(VSubjectAgendaPeer::ACADEMIC_CALENDAR_ID, $vals[3], Criteria::IN);
}
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0;
try {
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
示例8: doDelete
/**
* Method perform a DELETE on the database, given a ExamCommentDig or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or ExamCommentDig object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(ExamCommentDigPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
ExamCommentDigPeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
} elseif ($values instanceof ExamCommentDig) {
// invalidate the cache for this single object
ExamCommentDigPeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
// primary key is composite; we therefore, expect
// the primary key passed to be an array of pkey
// values
if (count($values) == count($values, COUNT_RECURSIVE)) {
// array is not multi-dimensional
$values = array($values);
}
foreach ($values as $value) {
$criterion = $criteria->getNewCriterion(ExamCommentDigPeer::IP, $value[0]);
$criterion->addAnd($criteria->getNewCriterion(ExamCommentDigPeer::COMMENT_ID, $value[1]));
$criteria->addOr($criterion);
// we can invalidate the cache for this single PK
ExamCommentDigPeer::removeInstanceFromPool($value);
}
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0;
// initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
}
示例9: doDelete
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(VOpacPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values;
} elseif ($values instanceof VOpac) {
$criteria = $values->buildPkeyCriteria();
} else {
$criteria = new Criteria(self::DATABASE_NAME);
if (count($values) == count($values, COUNT_RECURSIVE)) {
$values = array($values);
}
$vals = array();
foreach ($values as $value) {
$vals[0][] = $value[0];
$vals[1][] = $value[1];
$vals[2][] = $value[2];
$vals[3][] = $value[3];
$vals[4][] = $value[4];
}
$criteria->add(VOpacPeer::CATALOG_ID, $vals[0], Criteria::IN);
$criteria->add(VOpacPeer::DEPARTMENT_ID, $vals[1], Criteria::IN);
$criteria->add(VOpacPeer::CAT_CATEGORY_ID, $vals[2], Criteria::IN);
$criteria->add(VOpacPeer::COL_STATUS_ID, $vals[3], Criteria::IN);
$criteria->add(VOpacPeer::COL_LOCATION_ID, $vals[4], Criteria::IN);
}
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0;
try {
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
示例10: doDelete
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(EtimeAudiencePeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values;
} elseif ($values instanceof EtimeAudience) {
$criteria = $values->buildPkeyCriteria();
} else {
$criteria = new Criteria(self::DATABASE_NAME);
if (count($values) == count($values, COUNT_RECURSIVE)) {
$values = array($values);
}
$vals = array();
foreach ($values as $value) {
$vals[0][] = $value[0];
$vals[1][] = $value[1];
}
$criteria->add(EtimeAudiencePeer::ETIME_ID, $vals[0], Criteria::IN);
$criteria->add(EtimeAudiencePeer::AUDIENCE_ID, $vals[1], Criteria::IN);
}
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0;
try {
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
示例11: doDelete
/**
* Performs a DELETE on the database, given a Traspaso or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or Traspaso object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TraspasoPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// rename for clarity
$criteria = clone $values;
} elseif ($values instanceof Traspaso) {
// it's a model object
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else {
// it's a primary key, or an array of pks
$criteria = new Criteria(TraspasoPeer::DATABASE_NAME);
// primary key is composite; we therefore, expect
// the primary key passed to be an array of pkey values
if (count($values) == count($values, COUNT_RECURSIVE)) {
// array is not multi-dimensional
$values = array($values);
}
foreach ($values as $value) {
$criterion = $criteria->getNewCriterion(TraspasoPeer::IDINVENTARIOLUGAR, $value[0]);
$criterion->addAnd($criteria->getNewCriterion(TraspasoPeer::IDLUGARREMITENTE, $value[1]));
$criterion->addAnd($criteria->getNewCriterion(TraspasoPeer::IDLUGARDESTINATARIO, $value[2]));
$criteria->addOr($criterion);
}
}
// Set the correct dbName
$criteria->setDbName(TraspasoPeer::DATABASE_NAME);
$affectedRows = 0;
// initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
// cloning the Criteria in case it's modified by doSelect() or doSelectStmt()
$c = clone $criteria;
$affectedRows += TraspasoPeer::doOnDeleteCascade($c, $con);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
if ($values instanceof Criteria) {
TraspasoPeer::clearInstancePool();
} elseif ($values instanceof Traspaso) {
// it's a model object
TraspasoPeer::removeInstanceFromPool($values);
} else {
// it's a primary key, or an array of pks
foreach ((array) $values as $singleval) {
TraspasoPeer::removeInstanceFromPool($singleval);
}
}
$affectedRows += BasePeer::doDelete($criteria, $con);
TraspasoPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (Exception $e) {
$con->rollBack();
throw $e;
}
}
示例12: testCommentDoDelete
public function testCommentDoDelete()
{
$c = new Criteria();
$c->setComment('Foo');
$c->add(BookPeer::TITLE, 'War And Peace');
$con = Propel::getConnection(BookPeer::DATABASE_NAME);
BasePeer::doDelete($c, $con);
$expected = 'DELETE /* Foo */ FROM `book` WHERE book.TITLE=\'War And Peace\'';
$this->assertEquals($expected, $con->getLastExecutedQuery(), 'Criteria::setComment() adds a comment to delete queries');
}
示例13: doDelete
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(RelAnioActividadDocentePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
RelAnioActividadDocentePeer::clearInstancePool();
$criteria = clone $values;
} elseif ($values instanceof RelAnioActividadDocente) {
RelAnioActividadDocentePeer::removeInstanceFromPool($values);
$criteria = $values->buildPkeyCriteria();
} else {
$criteria = new Criteria(self::DATABASE_NAME);
if (count($values) == count($values, COUNT_RECURSIVE)) {
$values = array($values);
}
foreach ($values as $value) {
$criterion = $criteria->getNewCriterion(RelAnioActividadDocentePeer::FK_ANIO_ACTIVIDAD_ID, $value[0]);
$criterion->addAnd($criteria->getNewCriterion(RelAnioActividadDocentePeer::FK_DOCENTE_ID, $value[1]));
$criteria->addOr($criterion);
RelAnioActividadDocentePeer::removeInstanceFromPool($value);
}
}
$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;
}
}
示例14: executeCron
//.........这里部分代码省略.........
$criteriaWhere->add(UsersPeer::DEP_UID, $departmentUID);
$this->dMoved += UsersPeer::doCount($criteriaWhere);
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
}
}
unset($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["DEPARTMENTS_TO_UNASSIGN"]);
$rbac =& RBAC::getSingleton();
$rbac->authSourcesObj->update($arrayAuthenticationSourceData);
}
if (isset($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["GROUPS_TO_UNASSIGN"])) {
if (is_array($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["GROUPS_TO_UNASSIGN"])) {
foreach ($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["GROUPS_TO_UNASSIGN"] as $groupUID) {
// Delete manager assignments
$groupsInstance = new Groups();
$criteria = $groupsInstance->getUsersGroupCriteria($groupUID);
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$users = array();
while ($row = $dataset->getRow()) {
$users[] = $row["USR_UID"];
$dataset->next();
}
$criteriaSet = new Criteria("workflow");
$criteriaSet->add(UsersPeer::USR_REPORTS_TO, "");
$criteriaWhere = new Criteria("workflow");
$criteriaWhere->add(UsersPeer::USR_UID, $users, Criteria::IN);
$criteriaWhere->add(UsersPeer::USR_REPORTS_TO, "", Criteria::NOT_EQUAL);
$this->deletedManager = BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
// Delete group assignments
$criteria = new Criteria("workflow");
$criteria->add(GroupUserPeer::GRP_UID, $groupUID);
$this->gMoved += GroupUserPeer::doCount($criteria);
BasePeer::doDelete($criteria, Propel::getConnection("workflow"));
}
}
unset($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["GROUPS_TO_UNASSIGN"]);
$rbac =& RBAC::getSingleton();
$rbac->authSourcesObj->update($arrayAuthenticationSourceData);
}
// Delete the managers that not exists in PM
$criteria = new Criteria("rbac");
$criteria->addSelectColumn(RbacUsersPeer::USR_AUTH_USER_DN);
$criteria->add(RbacUsersPeer::USR_AUTH_USER_DN, "", Criteria::NOT_EQUAL);
$dataset = RbacUsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$existingUsers = array();
while ($row = $dataset->getRow()) {
$existingUsers[] = $row["USR_AUTH_USER_DN"];
$dataset->next();
}
foreach ($this->managersHierarchy as $managerDN => $subordinates) {
if (!in_array($managerDN, $existingUsers)) {
unset($this->managersHierarchy[$managerDN]);
}
}
// Get the managers assigments counters
$plugin->synchronizeManagers($this->managersHierarchy);
$deletedManagersAssignments = self::array_diff_assoc_recursive($this->oldManagersHierarchy, $this->managersHierarchy);
$newManagersAssignments = self::array_diff_assoc_recursive($this->managersHierarchy, $this->oldManagersHierarchy);
$deletedManagers = array();
$newManagers = array();
$movedManagers = array();
if (is_array($deletedManagersAssignments)) {
foreach ($deletedManagersAssignments as $dn1 => $subordinates1) {
示例15: doDelete
/**
* Method perform a DELETE on the database, given a sfAsset or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or sfAsset object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(sfAssetPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
sfAssetPeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
} elseif ($values instanceof sfAsset) {
// invalidate the cache for this single object
sfAssetPeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(sfAssetPeer::ID, (array) $values, Criteria::IN);
foreach ((array) $values as $singleval) {
// we can invalidate the cache for this single object
sfAssetPeer::removeInstanceFromPool($singleval);
}
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0;
// initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
}