Development

#3500: updateDefaultsFromObject.diff

You must first sign up to be able to contribute.

Ticket #3500: updateDefaultsFromObject.diff

File updateDefaultsFromObject.diff, 0.9 kB (added by thomas.s, 5 months ago)

updateDefaultsFromObject and getManyToManyRelations

  • /Users/thomas/Workspace/erfahrung/symfony11/plugins/sfDoctrinePlugin/data/generator/sfDoctrineForm/default/template/sfDoctrineFormGeneratedTemplate.php

    old new  
    6464      $values = array(); 
    6565      foreach ($this->object-><?php echo $relation['alias']; ?> as $obj) 
    6666      { 
    67         $values[] = $obj-><?php echo $relation->getForeignFieldName(); ?>
     67        $values[] = current($obj->identifier())
    6868      } 
    6969 
    7070      $this->setDefault('<?php echo $this->underscore($relation['refTable']->getOption('name')) ?>_list', $values);