1
0
mirror of synced 2024-12-14 15:16:04 +03:00
This commit is contained in:
zYne 2007-06-06 00:12:44 +00:00
parent 86c5a659ed
commit 22a2494569

View File

@ -83,16 +83,22 @@ class Doctrine_AuditLog
$data['columns'] = array_merge(array($this->_options['identifier'] =>
array('type' => 'integer',
'primary' => true,
'length' => 8,
'autoinc' => true)), $data['columns']);
$definition = 'class ' . str_replace('%CLASS%', $this->_table->getComponentName(), $this->_options['className'])
$className = str_replace('%CLASS%', $this->_table->getComponentName(), $this->_options['className']);
$definition = 'class ' . $className
. ' extends Doctrine_Record { '
. 'public function setTableDefinition() { '
. '$this->hasColumns(' . var_export($data['columns'], true) . ');'
. '$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;
eval( $definition );