コード例 #1
0
ファイル: BaseTipoespacio.php プロジェクト: mediasadc/alba
 public function reload($deep = false, PropelPDO $con = null)
 {
     if ($this->isDeleted()) {
         throw new PropelException("Cannot reload a deleted object.");
     }
     if ($this->isNew()) {
         throw new PropelException("Cannot reload an unsaved object.");
     }
     if ($con === null) {
         $con = Propel::getConnection(TipoespacioPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $stmt = TipoespacioPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
     $row = $stmt->fetch(PDO::FETCH_NUM);
     $stmt->closeCursor();
     if (!$row) {
         throw new PropelException('Cannot find matching row in the database to reload object values.');
     }
     $this->hydrate($row, 0, true);
     if ($deep) {
         $this->collEspacios = null;
         $this->lastEspacioCriteria = null;
     }
 }
コード例 #2
0
 public static function doSelect(Criteria $criteria, PropelPDO $con = null)
 {
     return TipoespacioPeer::populateObjects(TipoespacioPeer::doSelectStmt($criteria, $con));
 }