| @@ 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 | ||
| @@ 423-446 (lines=24) @@ | ||
| 420 | * @throws PropelException Any exceptions caught during processing will be |
|
| 421 | * rethrown wrapped into a PropelException. |
|
| 422 | */ |
|
| 423 | public function delete(ConnectionInterface $con = null) |
|
| 424 | { |
|
| 425 | if (null === $con) { |
|
| 426 | $con = Propel::getServiceContainer()->getWriteConnection(TaskTableMap::DATABASE_NAME); |
|
| 427 | } |
|
| 428 | ||
| 429 | $criteria = $this; |
|
| 430 | ||
| 431 | // Set the correct dbName |
|
| 432 | $criteria->setDbName(TaskTableMap::DATABASE_NAME); |
|
| 433 | ||
| 434 | // use transaction because $criteria could contain info |
|
| 435 | // for more than one table or we could emulating ON DELETE CASCADE, etc. |
|
| 436 | return $con->transaction(function () use ($con, $criteria) { |
|
| 437 | $affectedRows = 0; // initialize var to track total num of affected rows |
|
| 438 | ||
| 439 | TaskTableMap::removeInstanceFromPool($criteria); |
|
| 440 | ||
| 441 | $affectedRows += ModelCriteria::delete($con); |
|
| 442 | TaskTableMap::clearRelatedInstancePool(); |
|
| 443 | ||
| 444 | return $affectedRows; |
|
| 445 | }); |
|
| 446 | } |
|
| 447 | ||
| 448 | } // TaskQuery |
|
| 449 | ||
| @@ 559-582 (lines=24) @@ | ||
| 556 | * @throws PropelException Any exceptions caught during processing will be |
|
| 557 | * rethrown wrapped into a PropelException. |
|
| 558 | */ |
|
| 559 | public function delete(ConnectionInterface $con = null) |
|
| 560 | { |
|
| 561 | if (null === $con) { |
|
| 562 | $con = Propel::getServiceContainer()->getWriteConnection(UserTableMap::DATABASE_NAME); |
|
| 563 | } |
|
| 564 | ||
| 565 | $criteria = $this; |
|
| 566 | ||
| 567 | // Set the correct dbName |
|
| 568 | $criteria->setDbName(UserTableMap::DATABASE_NAME); |
|
| 569 | ||
| 570 | // use transaction because $criteria could contain info |
|
| 571 | // for more than one table or we could emulating ON DELETE CASCADE, etc. |
|
| 572 | return $con->transaction(function () use ($con, $criteria) { |
|
| 573 | $affectedRows = 0; // initialize var to track total num of affected rows |
|
| 574 | ||
| 575 | UserTableMap::removeInstanceFromPool($criteria); |
|
| 576 | ||
| 577 | $affectedRows += ModelCriteria::delete($con); |
|
| 578 | UserTableMap::clearRelatedInstancePool(); |
|
| 579 | ||
| 580 | return $affectedRows; |
|
| 581 | }); |
|
| 582 | } |
|
| 583 | ||
| 584 | } // UserQuery |
|
| 585 | ||