| @@ 548-568 (lines=21) @@ | ||
| 545 | * @see Task::setDeleted() |
|
| 546 | * @see Task::isDeleted() |
|
| 547 | */ |
|
| 548 | public function delete(ConnectionInterface $con = null) |
|
| 549 | { |
|
| 550 | if ($this->isDeleted()) { |
|
| 551 | throw new PropelException("This object has already been deleted."); |
|
| 552 | } |
|
| 553 | ||
| 554 | if ($con === null) { |
|
| 555 | $con = Propel::getServiceContainer()->getWriteConnection(TaskTableMap::DATABASE_NAME); |
|
| 556 | } |
|
| 557 | ||
| 558 | $con->transaction(function () use ($con) { |
|
| 559 | $deleteQuery = ChildTaskQuery::create() |
|
| 560 | ->filterByPrimaryKey($this->getPrimaryKey()); |
|
| 561 | $ret = $this->preDelete($con); |
|
| 562 | if ($ret) { |
|
| 563 | $deleteQuery->delete($con); |
|
| 564 | $this->postDelete($con); |
|
| 565 | $this->setDeleted(true); |
|
| 566 | } |
|
| 567 | }); |
|
| 568 | } |
|
| 569 | ||
| 570 | /** |
|
| 571 | * Persists this object to the database. |
|
| @@ 704-724 (lines=21) @@ | ||
| 701 | * @see User::setDeleted() |
|
| 702 | * @see User::isDeleted() |
|
| 703 | */ |
|
| 704 | public function delete(ConnectionInterface $con = null) |
|
| 705 | { |
|
| 706 | if ($this->isDeleted()) { |
|
| 707 | throw new PropelException("This object has already been deleted."); |
|
| 708 | } |
|
| 709 | ||
| 710 | if ($con === null) { |
|
| 711 | $con = Propel::getServiceContainer()->getWriteConnection(UserTableMap::DATABASE_NAME); |
|
| 712 | } |
|
| 713 | ||
| 714 | $con->transaction(function () use ($con) { |
|
| 715 | $deleteQuery = ChildUserQuery::create() |
|
| 716 | ->filterByPrimaryKey($this->getPrimaryKey()); |
|
| 717 | $ret = $this->preDelete($con); |
|
| 718 | if ($ret) { |
|
| 719 | $deleteQuery->delete($con); |
|
| 720 | $this->postDelete($con); |
|
| 721 | $this->setDeleted(true); |
|
| 722 | } |
|
| 723 | }); |
|
| 724 | } |
|
| 725 | ||
| 726 | /** |
|
| 727 | * Persists this object to the database. |
|
| @@ 574-594 (lines=21) @@ | ||
| 571 | * @see Selfprice::setDeleted() |
|
| 572 | * @see Selfprice::isDeleted() |
|
| 573 | */ |
|
| 574 | public function delete(ConnectionInterface $con = null) |
|
| 575 | { |
|
| 576 | if ($this->isDeleted()) { |
|
| 577 | throw new PropelException("This object has already been deleted."); |
|
| 578 | } |
|
| 579 | ||
| 580 | if ($con === null) { |
|
| 581 | $con = Propel::getServiceContainer()->getWriteConnection(SelfpriceTableMap::DATABASE_NAME); |
|
| 582 | } |
|
| 583 | ||
| 584 | $con->transaction(function () use ($con) { |
|
| 585 | $deleteQuery = ChildSelfpriceQuery::create() |
|
| 586 | ->filterByPrimaryKey($this->getPrimaryKey()); |
|
| 587 | $ret = $this->preDelete($con); |
|
| 588 | if ($ret) { |
|
| 589 | $deleteQuery->delete($con); |
|
| 590 | $this->postDelete($con); |
|
| 591 | $this->setDeleted(true); |
|
| 592 | } |
|
| 593 | }); |
|
| 594 | } |
|
| 595 | ||
| 596 | /** |
|
| 597 | * Persists this object to the database. |
|