Changeset 4576
- Timestamp:
- 06/28/08 04:09:11 (12 months ago)
- Files:
-
- 1 modified
-
branches/0.11/lib/Doctrine/Import/Schema.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Import/Schema.php
r4517 r4576 481 481 // Populate the parents subclasses 482 482 if ($definition['inheritance']['type'] == 'column_aggregation') { 483 $array[$extends]['inheritance']['subclasses'][$definition['className']] = array($definition['inheritance']['keyField'] => $definition['inheritance']['keyValue']); 483 $parent = $this->_findBaseSuperClass($array, $definition['className']); 484 $array[$parent]['inheritance']['subclasses'][$definition['className']] = array($definition['inheritance']['keyField'] => $definition['inheritance']['keyValue']); 484 485 } 485 486 } … … 487 488 488 489 return $array; 490 } 491 492 /** 493 * Find the base super class for this inheritance child. We need to move all levels of children to the 494 * top most parent. 495 * 496 * @param array $array Array of schema information 497 * @return string $class Class to get find the parent for 498 */ 499 protected function _findBaseSuperClass($array, $class) 500 { 501 if (isset($array[$class]['inheritance']['extends'])) { 502 return $this->_findBaseSuperClass($array, $array[$class]['inheritance']['extends']); 503 } else { 504 return $class; 505 } 489 506 } 490 507