Changeset 8804
- Timestamp:
- 05/06/08 14:11:10 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/generator/sfPropelFormGenerator.class.php
r8779 r8804 338 338 else if ($column->isPrimaryKey()) 339 339 { 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())); 341 341 } 342 342 else branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/validator/sfValidatorPropelChoice.class.php
r7902 r8804 27 27 * * criteria: A criteria to use when retrieving objects 28 28 * * column: The column name (null by default which means we use the primary key) 29 * must be in PhpName format29 * must be in field name format 30 30 * * connection: The Propel connection to use (null by default) 31 31 * … … 69 69 if ($this->getOption('column')) 70 70 { 71 $ phpName = $this->getOption('column');71 $columnName = $this->getOption('column'); 72 72 } 73 73 else … … 78 78 if ($column->isPrimaryKey()) 79 79 { 80 $ phpName = $column->getPhpName();80 $columnName = strtolower($column->getColumnName()); 81 81 break; 82 82 } … … 84 84 } 85 85 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); 87 87 } 88 88 }