1
0
mirror of synced 2025-01-29 19:41:45 +03:00
lsmith 2007-09-03 10:41:51 +00:00
parent 9a5f3b8b8f
commit 6f7736ade8

View File

@ -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();