Changeset 7055
- Timestamp:
- 01/14/08 20:50:27 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/plugins/sfPropelPlugin/data/generator/sfPropelForm/default/template/sfPropelFormGeneratedTemplate.php
r6967 r7055 65 65 if (!isset($this-><?php echo $name ?>Choices)) 66 66 { 67 $this-><?php echo $name ?>Choices = array(<?php !$info[2] and print "'' => ''" ?>);67 $this-><?php echo $name ?>Choices = array(<?php !$info[2] && !$info[3] and print "'' => ''" ?>); 68 68 foreach (<?php echo $info[0] ?>Peer::doSelect(new Criteria(), $this->getConnection()) as $object) 69 69 { branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/generator/sfPropelFormGenerator.class.php
r6966 r7055 137 137 * This method does not returns foreign keys that are also primary keys. 138 138 * 139 * @return array An array composed of: an array of foreign key PHP names, A Boolean to indicate whether the column is required or not 139 * @return array An array composed of: 140 * * The foreign table PHP name 141 * * The foreign key PHP name 142 * * A Boolean to indicate whether the column is required or not 143 * * A Boolean to indicate whether the column is a many to many relationship or not 140 144 */ 141 145 public function getForeignKeyNames() … … 146 150 if (!$column->isPrimaryKey() && $column->isForeignKey()) 147 151 { 148 $names[] = array($this->getForeignTable($column)->getPhpName(), $column->getPhpName(), $column->isNotNull() );152 $names[] = array($this->getForeignTable($column)->getPhpName(), $column->getPhpName(), $column->isNotNull(), false); 149 153 } 150 154 } … … 152 156 foreach ($this->getManyToManyTables() as $tables) 153 157 { 154 $names[] = array($tables['relatedTable']->getPhpName(), $tables['middleTable']->getPhpName(), false );158 $names[] = array($tables['relatedTable']->getPhpName(), $tables['middleTable']->getPhpName(), false, true); 155 159 } 156 160