Author: jwage
Date: 2008-08-27 04:01:36 +0100 (Wed, 27 Aug 2008)
New Revision: 4832

Modified:
   branches/1.0/lib/Doctrine/Import/Schema.php
Log:
fixes #1360


Modified: branches/1.0/lib/Doctrine/Import/Schema.php
===================================================================
--- branches/1.0/lib/Doctrine/Import/Schema.php 2008-08-27 02:51:25 UTC (rev 
4831)
+++ branches/1.0/lib/Doctrine/Import/Schema.php 2008-08-27 03:01:36 UTC (rev 
4832)
@@ -472,9 +472,9 @@
         $moves = array('columns' => array());
         
         foreach ($array as $className => $definition) {
-            $parent = $this->_findBaseSuperClass($array, 
$definition['className']);
             // Move any definitions on the schema to the parent
             if (isset($definition['inheritance']['extends']) && 
isset($definition['inheritance']['type']) && 
($definition['inheritance']['type'] == 'simple' || 
$definition['inheritance']['type'] == 'column_aggregation')) {
+                $parent = $this->_findBaseSuperClass($array, 
$definition['className']);
                 foreach ($moves as $move => $resetValue) {
                     $array[$parent][$move] = 
Doctrine_Lib::arrayDeepMerge($array[$parent][$move], $definition[$move]);
                     $array[$definition['className']][$move] = $resetValue;
@@ -499,7 +499,7 @@
      */
     protected function _findBaseSuperClass($array, $class)
     {
-        if (isset($array[$class]['inheritance']['extends'])) {
+        if (isset($array[$class]['inheritance']['extends']) && 
isset($array[$class]['inheritance']['type']) && 
($array[$class]['inheritance']['type'] == 'simple' || 
$array[$class]['inheritance']['type'] == 'column_aggregation')) {
             return $this->_findBaseSuperClass($array, 
$array[$class]['inheritance']['extends']);
         } else {
             return $class;


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to