Development

Changeset 8940

You must first sign up to be able to contribute.

Changeset 8940

Show
Ignore:
Timestamp:
05/14/08 03:54:57 (2 months ago)
Author:
Jonathan.Wage
Message:

fixes #3526

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDoctrinePlugin/trunk/data/generator/sfDoctrineForm/default/template/sfDoctrineFormGeneratedTemplate.php

    r8920 r8940  
    105105          ->delete() 
    106106          ->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())) 
    108108          ->execute(); 
    109109 
     
    114114      { 
    115115        $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()); 
    117117        $obj-><?php echo $relation->getForeignFieldName() ?> = $value; 
    118118        $obj->save();