Development

Changeset 8804

You must first sign up to be able to contribute.

Changeset 8804

Show
Ignore:
Timestamp:
05/06/08 14:11:10 (5 months ago)
Author:
fabien
Message:

changed column name format for sfValidatorPropelChoice from PHP name to column name to be coherent with the way everything else works (you must rebuild your forms with propel:build-forms)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/generator/sfPropelFormGenerator.class.php

    r8779 r8804  
    338338    else if ($column->isPrimaryKey()) 
    339339    { 
    340       $options[] = sprintf('\'model\' => \'%s\', \'column\' => \'%s\'', $column->getTable()->getPhpName(), $column->getPhpName()); 
     340      $options[] = sprintf('\'model\' => \'%s\', \'column\' => \'%s\'', $column->getTable()->getPhpName(), strtolower($column->getColumnName())); 
    341341    } 
    342342    else 
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/validator/sfValidatorPropelChoice.class.php

    r7902 r8804  
    2727   *  * criteria:   A criteria to use when retrieving objects 
    2828   *  * column:     The column name (null by default which means we use the primary key) 
    29    *                must be in PhpName format 
     29   *                must be in field name format 
    3030   *  * connection: The Propel connection to use (null by default) 
    3131   * 
     
    6969    if ($this->getOption('column')) 
    7070    { 
    71       $phpName = $this->getOption('column'); 
     71      $columnName = $this->getOption('column'); 
    7272    } 
    7373    else 
     
    7878        if ($column->isPrimaryKey()) 
    7979        { 
    80           $phpName = $column->getPhpName(); 
     80          $columnName = strtolower($column->getColumnName()); 
    8181          break; 
    8282        } 
     
    8484    } 
    8585 
    86     return call_user_func(array($this->getOption('model').'Peer', 'translateFieldName'), $phpName, BasePeer::TYPE_PHPNAME, BasePeer::TYPE_COLNAME); 
     86    return call_user_func(array($this->getOption('model').'Peer', 'translateFieldName'), $columnName, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_COLNAME); 
    8787  } 
    8888}