Example #1
0
 /**
  * Sets the alias for the model in this query
  *
  * @param string  $modelAlias    The model alias
  * @param boolean $useAliasInSQL Whether to use the alias in the SQL code (false by default)
  *
  * @return $this|ModelCriteria The current object, for fluid interface
  */
 public function setModelAlias($modelAlias, $useAliasInSQL = false)
 {
     if ($useAliasInSQL) {
         $this->addAlias($modelAlias, $this->tableMap->getName());
         $this->useAliasInSQL = true;
     }
     $this->modelAlias = $modelAlias;
     return $this;
 }
 /**
  * Add a new table object to the database.
  *
  * @param \Propel\Runtime\Map\TableMap $table The table to add
  */
 public function addTableObject(TableMap $table)
 {
     $table->setDatabaseMap($this);
     $this->tables[$table->getName()] = $table;
     $phpName = $table->getClassName();
     if ('\\' !== $phpName[0]) {
         $phpName = '\\' . $phpName;
     }
     $this->tablesByPhpName[$phpName] = $table;
 }
Example #3
0
 /**
  * Add a new table object to the database.
  *
  * @param      \Propel\Runtime\Map\TableMap $table The table to add
  */
 public function addTableObject(TableMap $table)
 {
     $table->setDatabaseMap($this);
     $this->tables[$table->getName()] = $table;
     $this->tablesByPhpName[$table->getClassname()] = $table;
 }