Commit 6f7736ad authored by lsmith's avatar lsmith
parent 9a5f3b8b
......@@ -1044,18 +1044,21 @@ class Doctrine_Export extends Doctrine_Connection_Module
// class must have method setTableDefinition (to avoid non-Record subclasses like symfony's sfDoctrineRecord)
// we have to recursively iterate through the class parents just to be sure that the classes using for example
// column aggregation inheritance are properly exporterd to database
while ($class->isAbstract() &&
! $class->isSubclassOf($parent) &&
! $class->hasMethod('setTableDefinition') &&
while ($class->isAbstract() ||
! $class->isSubclassOf($parent) ||
! $class->hasMethod('setTableDefinition') ||
$class->getMethod('setTableDefinition')->getDeclaringClass()->getName() !== $class->getName()) {
$class = $class->getParent();
if ($class === null) {
$class = $class->getParentClass();
if ($class === false) {
break;
}
}
if ($class === false) {
continue;
}
$record = new $name();
$table = $record->getTable();
$data = $table->getExportableFormat();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment