Commit 6f7736ad authored by lsmith's avatar lsmith
parent 9a5f3b8b
...@@ -1044,18 +1044,21 @@ class Doctrine_Export extends Doctrine_Connection_Module ...@@ -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) // 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 // 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 // column aggregation inheritance are properly exporterd to database
while ($class->isAbstract() && while ($class->isAbstract() ||
! $class->isSubclassOf($parent) && ! $class->isSubclassOf($parent) ||
! $class->hasMethod('setTableDefinition') && ! $class->hasMethod('setTableDefinition') ||
$class->getMethod('setTableDefinition')->getDeclaringClass()->getName() !== $class->getName()) { $class->getMethod('setTableDefinition')->getDeclaringClass()->getName() !== $class->getName()) {
$class = $class->getParent(); $class = $class->getParentClass();
if ($class === false) {
if ($class === null) {
break; break;
} }
} }
if ($class === false) {
continue;
}
$record = new $name(); $record = new $name();
$table = $record->getTable(); $table = $record->getTable();
$data = $table->getExportableFormat(); $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