| 486 | | $conn = Doctrine_Manager::getInstance()->getConnectionForComponent($name); |
| 487 | | // check if class is an instance of Doctrine_Record and not abstract |
| 488 | | // class must have method setTableDefinition (to avoid non-Record subclasses like symfony's sfDoctrineRecord) |
| 489 | | // we have to recursively iterate through the class parents just to be sure that the classes using for example |
| 490 | | // column aggregation inheritance are properly exported to database |
| 491 | | while ($class->isAbstract() || |
| 492 | | ! $class->isSubclassOf($parent) || |
| 493 | | ! $class->hasMethod('setTableDefinition') || |
| 494 | | ( $class->hasMethod('setTableDefinition') && |
| 495 | | $class->getMethod('setTableDefinition')->getDeclaringClass()->getName() !== $class->getName())) { |
| 496 | | |
| 497 | | $class = $class->getParentClass(); |
| 498 | | if ($class === false) { |
| 499 | | break; |
| 500 | | } |
| 501 | | } |