1
0
mirror of synced 2024-12-13 14:56:01 +03:00

avoid attempting to export non-record classes like symfony's sfDoctrineRecord

This commit is contained in:
hansbrix 2007-06-23 22:53:00 +00:00
parent 613fdf0952
commit 2206476d55

View File

@ -993,7 +993,8 @@ class Doctrine_Export extends Doctrine_Connection_Module
$conn = Doctrine_Manager::getInstance()->getConnectionForComponent($name);
// check if class is an instance of Doctrine_Record and not abstract
if ($class->isSubclassOf($parent) && ! $class->isAbstract()) {
// class must have method setTableDefinition (to avoid non-Record subclasses like symfony's sfDoctrineRecord)
if ($class->isSubclassOf($parent) && ! $class->isAbstract() && method_exists($class->getName(), 'setTableDefinition')) {
$record = new $name();
$table = $record->getTable();
$data = $table->getExportableFormat();