На всякий случай, если кто-нибудь еще наткнется на это: Вот быстрое решение, как получить версионные записи. (Конечно, это лучше реализовать внутри или как расширение класса AuditLog, но для быстрого решения следующее может просто пойти куда угодно.)
/**
* get collection of versioned records as array
*
* @param string $table table name without the 'Version' -suffix (e.g. 'User' instead of 'UserVersion')
* @param mixed $id simple id or array with key / value pairs for compound keys
* @return array
*/
public function getHistory($table, $ids) {
$className = $table . 'Version';
$identifiers = (array) Doctrine_Core::getTable($table)->getIdentifier();
if (count($identifiers) === 1) {
$ids = array_combine($identifiers, (array) $ids);
}
$q = Doctrine_Core::getTable($className)
->createQuery();
$conditions = array();
$values = array();
foreach ($identifiers as $id) {
if (!isset($ids[$id])) {
throw new Doctrine_Record_Exception('Primary key \'' . $id . '\' must be given to access ' . $className . '.');
}
$conditions[] = $className . '.' . $id . ' = ?';
$values[] = $ids[$id];
}
$q->where(implode(' AND ', $conditions));
$data = $q->execute($values, Doctrine_Core::HYDRATE_ARRAY);
return $data;
}