This commit is contained in:
parent
c4b3a18a59
commit
ead84035f8
@ -900,12 +900,12 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
|
|||||||
$class = $name . 'Table';
|
$class = $name . 'Table';
|
||||||
|
|
||||||
if (class_exists($class) && in_array('Doctrine_Table', class_parents($class))) {
|
if (class_exists($class) && in_array('Doctrine_Table', class_parents($class))) {
|
||||||
$table = new $class($name, $this);
|
$table = new $class($name, $this, true);
|
||||||
} else {
|
} else {
|
||||||
$table = new Doctrine_Table($name, $this);
|
$table = new Doctrine_Table($name, $this, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tables[$name] = $table;
|
$this->tables[$name] = $table;
|
||||||
|
|
||||||
return $table;
|
return $table;
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
|
|||||||
* @param string $name the name of the component
|
* @param string $name the name of the component
|
||||||
* @param Doctrine_Connection $conn the connection associated with this table
|
* @param Doctrine_Connection $conn the connection associated with this table
|
||||||
*/
|
*/
|
||||||
public function __construct($name, Doctrine_Connection $conn)
|
public function __construct($name, Doctrine_Connection $conn, $initDefinition = false)
|
||||||
{
|
{
|
||||||
$this->_conn = $conn;
|
$this->_conn = $conn;
|
||||||
|
|
||||||
@ -185,15 +185,17 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
|
|||||||
$this->_options['name'] = $name;
|
$this->_options['name'] = $name;
|
||||||
$this->_parser = new Doctrine_Relation_Parser($this);
|
$this->_parser = new Doctrine_Relation_Parser($this);
|
||||||
|
|
||||||
$record = $this->initDefinition($name);
|
if ($initDefinition) {
|
||||||
|
$record = $this->initDefinition($name);
|
||||||
$this->initIdentifier();
|
|
||||||
|
$this->initIdentifier();
|
||||||
$record->setUp();
|
|
||||||
|
$record->setUp();
|
||||||
// if tree, set up tree
|
|
||||||
if ($this->isTree()) {
|
// if tree, set up tree
|
||||||
$this->getTree()->setUp();
|
if ($this->isTree()) {
|
||||||
|
$this->getTree()->setUp();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$this->_filters[] = new Doctrine_Record_Filter_Standard();
|
$this->_filters[] = new Doctrine_Record_Filter_Standard();
|
||||||
$this->_repository = new Doctrine_Table_Repository($this);
|
$this->_repository = new Doctrine_Table_Repository($this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user