Changeset 5209 for branches/1.0/lib

Show
Ignore:
Timestamp:
11/21/08 16:42:15 (7 weeks ago)
Author:
guilhermeblanco
Message:

[1.0, 1.1] fixes #1621. Fixed inheritance with M2M relations + aliases. Third needed part of this patch.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/lib/Doctrine/Record/Abstract.php

    r4957 r5209  
    129129    { 
    130130        if (isset($map[get_class($this)])) { 
    131             $this->_table->setOption('inheritanceMap', $map[get_class($this)]); 
     131            // fix for #1621  
     132            $mapFieldNames = $map[get_class($this)];  
     133            $mapColumnNames = array();  
     134 
     135            foreach ($mapFieldNames as $fieldName => $val) {  
     136                $mapColumnNames[$this->getTable()->getColumnName($fieldName)] = $val;  
     137            } 
     138  
     139            $this->_table->setOption('inheritanceMap', $mapColumnNames); 
    132140            return; 
    133141        }