1
0
mirror of synced 2025-01-30 20:11:49 +03:00

added initIdentifier()

This commit is contained in:
zYne 2007-10-15 20:43:24 +00:00
parent 54c3b98d73
commit 3b8efd07e6

View File

@ -234,6 +234,20 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
$this->_options['tableName'] = Doctrine::tableize($class->getName()); $this->_options['tableName'] = Doctrine::tableize($class->getName());
} }
$this->initIdentifier();
$record->setUp();
// if tree, set up tree
if ($this->isTree()) {
$this->getTree()->setUp();
}
$this->_filters[] = new Doctrine_Record_Filter_Standard();
$this->_repository = new Doctrine_Table_Repository($this);
}
public function initIdentifier()
{
switch (count($this->_identifier)) { switch (count($this->_identifier)) {
case 0: case 0:
$this->_columns = array_merge(array('id' => $this->_columns = array_merge(array('id' =>
@ -252,8 +266,9 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
$found = false; $found = false;
foreach ($e as $option => $value) { foreach ($e as $option => $value) {
if ($found) if ($found) {
break; break;
}
$e2 = explode(':', $option); $e2 = explode(':', $option);
@ -291,16 +306,8 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
default: default:
$this->_identifierType = Doctrine::IDENTIFIER_COMPOSITE; $this->_identifierType = Doctrine::IDENTIFIER_COMPOSITE;
} }
$record->setUp();
// if tree, set up tree
if ($this->isTree()) {
$this->getTree()->setUp();
}
$this->_filters[] = new Doctrine_Record_Filter_Standard();
$this->_repository = new Doctrine_Table_Repository($this);
} }
public function getMethodOwner($method) public function getMethodOwner($method)
{ {
return (isset($this->_invokedMethods[$method])) ? return (isset($this->_invokedMethods[$method])) ?