This commit is contained in:
parent
86c5a659ed
commit
22a2494569
@ -83,16 +83,22 @@ class Doctrine_AuditLog
|
|||||||
$data['columns'] = array_merge(array($this->_options['identifier'] =>
|
$data['columns'] = array_merge(array($this->_options['identifier'] =>
|
||||||
array('type' => 'integer',
|
array('type' => 'integer',
|
||||||
'primary' => true,
|
'primary' => true,
|
||||||
|
'length' => 8,
|
||||||
'autoinc' => true)), $data['columns']);
|
'autoinc' => true)), $data['columns']);
|
||||||
|
|
||||||
|
|
||||||
|
$className = str_replace('%CLASS%', $this->_table->getComponentName(), $this->_options['className']);
|
||||||
$definition = 'class ' . str_replace('%CLASS%', $this->_table->getComponentName(), $this->_options['className'])
|
$definition = 'class ' . $className
|
||||||
. ' extends Doctrine_Record { '
|
. ' extends Doctrine_Record { '
|
||||||
. 'public function setTableDefinition() { '
|
. 'public function setTableDefinition() { '
|
||||||
. '$this->hasColumns(' . var_export($data['columns'], true) . ');'
|
. '$this->hasColumns(' . var_export($data['columns'], true) . ');'
|
||||||
. '$this->option(\'tableName\', \'' . $data['tableName'] . '\'); } }';
|
. '$this->option(\'tableName\', \'' . $data['tableName'] . '\'); } }';
|
||||||
|
|
||||||
|
$this->_table->getRelationParser()->bind($className, array(
|
||||||
|
'local' => $this->_table->getIdentifier(),
|
||||||
|
'foreign' => $this->_table->getIdentifier(),
|
||||||
|
'type' => Doctrine_Relation::MANY));
|
||||||
|
|
||||||
print $definition;
|
print $definition;
|
||||||
|
|
||||||
eval( $definition );
|
eval( $definition );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user