Changeset 3795

Show
Ignore:
Timestamp:
02/15/08 19:32:53 (17 months ago)
Author:
jwage
Message:

Reverting some changes that were included in the 0.10 branch from trunk that should not have been. They were refactorings related to the inheritance changes in progress by romanb. The code was reverted to the state it was in 0.9 so the inheritance yaml schema file definitions will work correctly.

Location:
branches/0.10/lib/Doctrine/Import
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/0.10/lib/Doctrine/Import/Builder.php

    r3415 r3795  
    278278    public function buildTableDefinition(array $definition) 
    279279    { 
    280         // If the inheritance type if simple or column aggregation then we do not need a table definition 
    281         if (isset($definition['inheritance']['type']) && ($definition['inheritance']['type'] == 'simple' || $definition['inheritance']['type'] == 'aggregation')) { 
    282             return; 
    283         } 
    284          
    285280        $ret = array(); 
    286281         
     
    315310        if (isset($definition['options']) && is_array($definition['options']) && !empty($definition['options'])) { 
    316311            $ret[$i] = $this->buildOptions($definition['options']); 
    317             $i++; 
    318         } 
    319          
    320         if (isset($definition['subclasses']) && is_array($definition['subclasses']) && !empty($definition['subclasses'])) { 
    321             $ret[$i] = '    $this->setSubclasses(' . var_export($definition['subclasses'], true) . ');'; 
    322312            $i++; 
    323313        } 
     
    404394                $i++; 
    405395            } 
     396        } 
     397 
     398        if (isset($definition['inheritance']['keyField']) && isset($definition['inheritance']['keyValue'])) { 
     399            $i++; 
     400            $ret[$i] = "    ".'$this->setInheritanceMap(array(\''.$definition['inheritance']['keyField'].'\' => \''.$definition['inheritance']['keyValue'].'\'));'; 
    406401        } 
    407402 
  • branches/0.10/lib/Doctrine/Import/Schema.php

    r3415 r3795  
    184184                          'package'             =>  null, 
    185185                          'inheritance'         =>  array(), 
    186                           'subclasses'          =>  array(), 
    187186                          'detect_relations'    =>  false, 
    188187                          'generate_accessors'  =>  false);