/**
  * Builds, binds and executes a SELECT query based on the current object.
  *
  * @param ConnectionInterface $con A connection object
  *
  * @return DataFetcherInterface A dataFetcher using the connection, ready to be fetched
  *
  * @throws \Propel\Runtime\Exception\PropelException
  */
 public function doSelect(ConnectionInterface $con = null)
 {
     // check that the columns of the main class are already added (if this is the primary ModelCriteria)
     if (!$this->hasSelectClause() && !$this->getPrimaryCriteria()) {
         $this->addSelfSelectColumns();
     }
     if (null === $con) {
         $con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
     }
     $this->configureSelectColumns();
     return parent::doSelect($con);
 }
Exemple #2
0
 /**
  * Builds, binds and executes a SELECT query based on the current object.
  *
  * @param ConnectionInterface $con A connection object
  *
  * @return DataFetcherInterface A dataFetcher using the connection, ready to be fetched
  *
  * @throws \Propel\Runtime\Exception\PropelException
  */
 public function doSelect(ConnectionInterface $con = null)
 {
     $this->addSelfSelectColumns();
     if (null === $con) {
         $con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
     }
     $this->configureSelectColumns();
     return parent::doSelect($con);
 }