| @@ 629-651 (lines=23) @@ | ||
| 626 | * @throws PropelException |
|
| 627 | * @see save() |
|
| 628 | */ |
|
| 629 | protected function doSave(ConnectionInterface $con) |
|
| 630 | { |
|
| 631 | $affectedRows = 0; // initialize var to track total num of affected rows |
|
| 632 | if (!$this->alreadyInSave) { |
|
| 633 | $this->alreadyInSave = true; |
|
| 634 | ||
| 635 | if ($this->isNew() || $this->isModified()) { |
|
| 636 | // persist changes |
|
| 637 | if ($this->isNew()) { |
|
| 638 | $this->doInsert($con); |
|
| 639 | $affectedRows += 1; |
|
| 640 | } else { |
|
| 641 | $affectedRows += $this->doUpdate($con); |
|
| 642 | } |
|
| 643 | $this->resetModified(); |
|
| 644 | } |
|
| 645 | ||
| 646 | $this->alreadyInSave = false; |
|
| 647 | ||
| 648 | } |
|
| 649 | ||
| 650 | return $affectedRows; |
|
| 651 | } // doSave() |
|
| 652 | ||
| 653 | /** |
|
| 654 | * Insert the row in the database. |
|
| @@ 655-677 (lines=23) @@ | ||
| 652 | * @throws PropelException |
|
| 653 | * @see save() |
|
| 654 | */ |
|
| 655 | protected function doSave(ConnectionInterface $con) |
|
| 656 | { |
|
| 657 | $affectedRows = 0; // initialize var to track total num of affected rows |
|
| 658 | if (!$this->alreadyInSave) { |
|
| 659 | $this->alreadyInSave = true; |
|
| 660 | ||
| 661 | if ($this->isNew() || $this->isModified()) { |
|
| 662 | // persist changes |
|
| 663 | if ($this->isNew()) { |
|
| 664 | $this->doInsert($con); |
|
| 665 | $affectedRows += 1; |
|
| 666 | } else { |
|
| 667 | $affectedRows += $this->doUpdate($con); |
|
| 668 | } |
|
| 669 | $this->resetModified(); |
|
| 670 | } |
|
| 671 | ||
| 672 | $this->alreadyInSave = false; |
|
| 673 | ||
| 674 | } |
|
| 675 | ||
| 676 | return $affectedRows; |
|
| 677 | } // doSave() |
|
| 678 | ||
| 679 | /** |
|
| 680 | * Insert the row in the database. |
|
| @@ 813-835 (lines=23) @@ | ||
| 810 | * @throws PropelException |
|
| 811 | * @see save() |
|
| 812 | */ |
|
| 813 | protected function doSave(ConnectionInterface $con) |
|
| 814 | { |
|
| 815 | $affectedRows = 0; // initialize var to track total num of affected rows |
|
| 816 | if (!$this->alreadyInSave) { |
|
| 817 | $this->alreadyInSave = true; |
|
| 818 | ||
| 819 | if ($this->isNew() || $this->isModified()) { |
|
| 820 | // persist changes |
|
| 821 | if ($this->isNew()) { |
|
| 822 | $this->doInsert($con); |
|
| 823 | $affectedRows += 1; |
|
| 824 | } else { |
|
| 825 | $affectedRows += $this->doUpdate($con); |
|
| 826 | } |
|
| 827 | $this->resetModified(); |
|
| 828 | } |
|
| 829 | ||
| 830 | $this->alreadyInSave = false; |
|
| 831 | ||
| 832 | } |
|
| 833 | ||
| 834 | return $affectedRows; |
|
| 835 | } // doSave() |
|
| 836 | ||
| 837 | /** |
|
| 838 | * Insert the row in the database. |
|