@@ 413-436 (lines=24) @@ | ||
410 | * @throws PropelException Any exceptions caught during processing will be |
|
411 | * rethrown wrapped into a PropelException. |
|
412 | */ |
|
413 | public function delete(ConnectionInterface $con = null) |
|
414 | { |
|
415 | if (null === $con) { |
|
416 | $con = Propel::getServiceContainer()->getWriteConnection(TaskTableMap::DATABASE_NAME); |
|
417 | } |
|
418 | ||
419 | $criteria = $this; |
|
420 | ||
421 | // Set the correct dbName |
|
422 | $criteria->setDbName(TaskTableMap::DATABASE_NAME); |
|
423 | ||
424 | // use transaction because $criteria could contain info |
|
425 | // for more than one table or we could emulating ON DELETE CASCADE, etc. |
|
426 | return $con->transaction(function () use ($con, $criteria) { |
|
427 | $affectedRows = 0; // initialize var to track total num of affected rows |
|
428 | ||
429 | TaskTableMap::removeInstanceFromPool($criteria); |
|
430 | ||
431 | $affectedRows += ModelCriteria::delete($con); |
|
432 | TaskTableMap::clearRelatedInstancePool(); |
|
433 | ||
434 | return $affectedRows; |
|
435 | }); |
|
436 | } |
|
437 | ||
438 | } // TaskQuery |
|
439 |
@@ 549-572 (lines=24) @@ | ||
546 | * @throws PropelException Any exceptions caught during processing will be |
|
547 | * rethrown wrapped into a PropelException. |
|
548 | */ |
|
549 | public function delete(ConnectionInterface $con = null) |
|
550 | { |
|
551 | if (null === $con) { |
|
552 | $con = Propel::getServiceContainer()->getWriteConnection(UserTableMap::DATABASE_NAME); |
|
553 | } |
|
554 | ||
555 | $criteria = $this; |
|
556 | ||
557 | // Set the correct dbName |
|
558 | $criteria->setDbName(UserTableMap::DATABASE_NAME); |
|
559 | ||
560 | // use transaction because $criteria could contain info |
|
561 | // for more than one table or we could emulating ON DELETE CASCADE, etc. |
|
562 | return $con->transaction(function () use ($con, $criteria) { |
|
563 | $affectedRows = 0; // initialize var to track total num of affected rows |
|
564 | ||
565 | UserTableMap::removeInstanceFromPool($criteria); |
|
566 | ||
567 | $affectedRows += ModelCriteria::delete($con); |
|
568 | UserTableMap::clearRelatedInstancePool(); |
|
569 | ||
570 | return $affectedRows; |
|
571 | }); |
|
572 | } |
|
573 | ||
574 | } // UserQuery |
|
575 |
@@ 433-456 (lines=24) @@ | ||
430 | * @throws PropelException Any exceptions caught during processing will be |
|
431 | * rethrown wrapped into a PropelException. |
|
432 | */ |
|
433 | public function delete(ConnectionInterface $con = null) |
|
434 | { |
|
435 | if (null === $con) { |
|
436 | $con = Propel::getServiceContainer()->getWriteConnection(SelfpriceTableMap::DATABASE_NAME); |
|
437 | } |
|
438 | ||
439 | $criteria = $this; |
|
440 | ||
441 | // Set the correct dbName |
|
442 | $criteria->setDbName(SelfpriceTableMap::DATABASE_NAME); |
|
443 | ||
444 | // use transaction because $criteria could contain info |
|
445 | // for more than one table or we could emulating ON DELETE CASCADE, etc. |
|
446 | return $con->transaction(function () use ($con, $criteria) { |
|
447 | $affectedRows = 0; // initialize var to track total num of affected rows |
|
448 | ||
449 | SelfpriceTableMap::removeInstanceFromPool($criteria); |
|
450 | ||
451 | $affectedRows += ModelCriteria::delete($con); |
|
452 | SelfpriceTableMap::clearRelatedInstancePool(); |
|
453 | ||
454 | return $affectedRows; |
|
455 | }); |
|
456 | } |
|
457 | ||
458 | } // SelfpriceQuery |
|
459 |