@@ 509-537 (lines=29) @@ | ||
506 | * @return void |
|
507 | * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db |
|
508 | */ |
|
509 | public function reload($deep = false, ConnectionInterface $con = null) |
|
510 | { |
|
511 | if ($this->isDeleted()) { |
|
512 | throw new PropelException("Cannot reload a deleted object."); |
|
513 | } |
|
514 | ||
515 | if ($this->isNew()) { |
|
516 | throw new PropelException("Cannot reload an unsaved object."); |
|
517 | } |
|
518 | ||
519 | if ($con === null) { |
|
520 | $con = Propel::getServiceContainer()->getReadConnection(TaskTableMap::DATABASE_NAME); |
|
521 | } |
|
522 | ||
523 | // We don't need to alter the object instance pool; we're just modifying this instance |
|
524 | // already in the pool. |
|
525 | ||
526 | $dataFetcher = ChildTaskQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); |
|
527 | $row = $dataFetcher->fetch(); |
|
528 | $dataFetcher->close(); |
|
529 | if (!$row) { |
|
530 | throw new PropelException('Cannot find matching row in the database to reload object values.'); |
|
531 | } |
|
532 | $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate |
|
533 | ||
534 | if ($deep) { // also de-associate any related objects? |
|
535 | ||
536 | } // if (deep) |
|
537 | } |
|
538 | ||
539 | /** |
|
540 | * Removes this object from datastore and sets delete attribute. |
@@ 535-563 (lines=29) @@ | ||
532 | * @return void |
|
533 | * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db |
|
534 | */ |
|
535 | public function reload($deep = false, ConnectionInterface $con = null) |
|
536 | { |
|
537 | if ($this->isDeleted()) { |
|
538 | throw new PropelException("Cannot reload a deleted object."); |
|
539 | } |
|
540 | ||
541 | if ($this->isNew()) { |
|
542 | throw new PropelException("Cannot reload an unsaved object."); |
|
543 | } |
|
544 | ||
545 | if ($con === null) { |
|
546 | $con = Propel::getServiceContainer()->getReadConnection(SelfpriceTableMap::DATABASE_NAME); |
|
547 | } |
|
548 | ||
549 | // We don't need to alter the object instance pool; we're just modifying this instance |
|
550 | // already in the pool. |
|
551 | ||
552 | $dataFetcher = ChildSelfpriceQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); |
|
553 | $row = $dataFetcher->fetch(); |
|
554 | $dataFetcher->close(); |
|
555 | if (!$row) { |
|
556 | throw new PropelException('Cannot find matching row in the database to reload object values.'); |
|
557 | } |
|
558 | $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate |
|
559 | ||
560 | if ($deep) { // also de-associate any related objects? |
|
561 | ||
562 | } // if (deep) |
|
563 | } |
|
564 | ||
565 | /** |
|
566 | * Removes this object from datastore and sets delete attribute. |
@@ 693-721 (lines=29) @@ | ||
690 | * @return void |
|
691 | * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db |
|
692 | */ |
|
693 | public function reload($deep = false, ConnectionInterface $con = null) |
|
694 | { |
|
695 | if ($this->isDeleted()) { |
|
696 | throw new PropelException("Cannot reload a deleted object."); |
|
697 | } |
|
698 | ||
699 | if ($this->isNew()) { |
|
700 | throw new PropelException("Cannot reload an unsaved object."); |
|
701 | } |
|
702 | ||
703 | if ($con === null) { |
|
704 | $con = Propel::getServiceContainer()->getReadConnection(UserTableMap::DATABASE_NAME); |
|
705 | } |
|
706 | ||
707 | // We don't need to alter the object instance pool; we're just modifying this instance |
|
708 | // already in the pool. |
|
709 | ||
710 | $dataFetcher = ChildUserQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); |
|
711 | $row = $dataFetcher->fetch(); |
|
712 | $dataFetcher->close(); |
|
713 | if (!$row) { |
|
714 | throw new PropelException('Cannot find matching row in the database to reload object values.'); |
|
715 | } |
|
716 | $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate |
|
717 | ||
718 | if ($deep) { // also de-associate any related objects? |
|
719 | ||
720 | } // if (deep) |
|
721 | } |
|
722 | ||
723 | /** |
|
724 | * Removes this object from datastore and sets delete attribute. |