This commit is contained in:
parent
9a5f3b8b8f
commit
6f7736ade8
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user