Changeset 3959

Show
Ignore:
Timestamp:
03/10/08 06:30:20 (16 months ago)
Author:
jwage
Message:

Added hack/fix to getColumnName() to fix situations where an array is passed to it

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.10/lib/Doctrine/Table.php

    r3951 r3959  
    877877    public function getColumnName($fieldName) 
    878878    { 
     879        // FIX ME: This is being used in places where an array is passed, but it should not be an array 
     880        // For example in places where Doctrine should support composite foreign/primary keys 
     881        $fieldName = is_array($fieldName) ? $fieldName[0]:$fieldName; 
     882 
    879883        if (isset($this->_columnNames[$fieldName])) { 
    880884            return $this->_columnNames[$fieldName]; 
    881885        } 
     886 
    882887        return $fieldName; 
    883888    } 
    884889     
    885890    /** 
    886      * 
    887      * 
     891     * getColumnDefinition 
     892     * 
     893     * @param string $columnName  
     894     * @return void 
    888895     */ 
    889896    public function getColumnDefinition($columnName)