Changeset 8940
- Timestamp:
- 05/14/08 03:54:57 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfDoctrinePlugin/trunk/data/generator/sfDoctrineForm/default/template/sfDoctrineFormGeneratedTemplate.php
r8920 r8940 105 105 ->delete() 106 106 ->from('<?php echo $relation['refTable']->getOption('name') ?> r') 107 ->where('r.<?php echo $relation->getLocalFieldName() ?>', $this->object->identifier())107 ->where('r.<?php echo $relation->getLocalFieldName() ?>', current($this->object->identifier())) 108 108 ->execute(); 109 109 … … 114 114 { 115 115 $obj = new <?php echo $relation['refTable']->getOption('name') ?>(); 116 $obj-><?php echo $relation->getLocalFieldName() ?> = $this->object->getPrimaryKey();116 $obj-><?php echo $relation->getLocalFieldName() ?> = current($this->object->identifier()); 117 117 $obj-><?php echo $relation->getForeignFieldName() ?> = $value; 118 118 $obj->save();