This commit is contained in:
parent
b13a70c087
commit
941a2e5761
@ -144,14 +144,15 @@ class Doctrine_AuditLog
|
|||||||
|
|
||||||
$columns = $table->getColumns();
|
$columns = $table->getColumns();
|
||||||
|
|
||||||
|
// the version column should be part of the primary key definition
|
||||||
|
$columns[$this->_options['versionColumn']]['primary'] = true;
|
||||||
|
|
||||||
$id = $table->getIdentifier();
|
$id = $table->getIdentifier();
|
||||||
|
|
||||||
$options = array('className' => $className);
|
$options = array('className' => $className);
|
||||||
|
|
||||||
$builder = new Doctrine_Import_Builder();
|
$builder = new Doctrine_Import_Builder();
|
||||||
|
|
||||||
$options['primary'][] = $this->_options['versionColumn'];
|
|
||||||
|
|
||||||
$def = $builder->buildDefinition($options, $columns);
|
$def = $builder->buildDefinition($options, $columns);
|
||||||
|
|
||||||
if ( ! $this->_options['generateFiles']) {
|
if ( ! $this->_options['generateFiles']) {
|
||||||
|
@ -1375,6 +1375,10 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
|
|||||||
->getAuditLog()
|
->getAuditLog()
|
||||||
->getVersion($this, $version);
|
->getVersion($this, $version);
|
||||||
|
|
||||||
|
if ( ! isset($data[0])) {
|
||||||
|
throw new Doctrine_Record_Exception('Version ' . $version . ' does not exist!');
|
||||||
|
}
|
||||||
|
|
||||||
$this->_data = $data[0];
|
$this->_data = $data[0];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user