I'm working with Symfony 1.2 and Doctrine 1.0 and I'm getting errors with the generated forms
Here is part of my schema.yml ############################################################## pltProjectModule: tableName: plt_project_module columns: project_id: type: integer(4) primary: true module_id: type: integer(4) primary: true relations: Project: class: pltProject foreignAlias: ProjectModules local: project_id onDelete: CASCADE Module: class: pltModule foreignAlias: ProjectModules local: module_id onDelete: CASCADE pltProjectModuleConfig: tableName: plt_project_module_config columns: project_id: type: integer(4) primary: true module_id: type: integer(4) primary: true config_id: type: integer(4) primary: true value: type: string(250) notnull: true default: '' relations: Config: class: pltConfig foreignAlias: ProjectModuleConfigs local: config_id onDelete: CASCADE ProjectModule: class: pltProjectModule foreignAlias: ProjectModuleConfigs local: [project_id, module_id] onDelete: CASCADE ############################################################## You can see i'm using a many-to-many relation and the primary key is composed by two fields ("local: [project_id, module_id]" defined in "pltProjectModuleConfig" model ). But when i go to see the form for the model "BasepltProjectModuleConfigForm" i find an error in the field "value". Here is BasepltProjectModuleConfigForm.class.php ############################################################## public function setup() { $this->setWidgets(array( 'project_id' => new sfWidgetFormInputHidden(), 'module_id' => new sfWidgetFormInputHidden(), 'config_id' => new sfWidgetFormInputHidden(), 'value' => new Notice: Array to string conversion in E:\wamp\bin\php\php5.2.9-1\PEAR \symfony\plugins\sfDoctrinePlugin\lib\generator \sfDoctrineColumn.class.php on line 230 sfWidgetFormInput( Notice: Array to string conversion in E:\wamp\bin\php\php5.2.9-1\PEAR \symfony\plugins\sfDoctrinePlugin\lib\generator \sfDoctrineColumn.class.php on line 230 ), )); $this->setValidators(array( 'project_id' => new sfValidatorDoctrineChoice(array('model' => 'pltProjectModuleConfig', 'column' => 'project_id', 'required' => false)), 'module_id' => new sfValidatorDoctrineChoice(array('model' => 'pltProjectModuleConfig', 'column' => 'module_id', 'required' => false)), 'config_id' => new sfValidatorDoctrineChoice(array('model' => 'pltProjectModuleConfig', 'column' => 'config_id', 'required' => false)), 'value' => new Notice: Array to string conversion in E:\wamp\bin\php\php5.2.9-1\PEAR \symfony\plugins\sfDoctrinePlugin\lib\generator \sfDoctrineColumn.class.php on line 230 sfValidatorString( Notice: Array to string conversion in E:\wamp\bin\php\php5.2.9-1\PEAR \symfony\plugins\sfDoctrinePlugin\lib\generator \sfDoctrineColumn.class.php on line 230 array('max_length' => 250)), )); $this->widgetSchema->setNameFormat('plt_project_module_config [%s]'); $this->errorSchema = new sfValidatorErrorSchema($this- >validatorSchema); parent::setup(); } ############################################################## I trying solve in many ways but I think the problem is "local: [project_id, module_id]" because when i take it out forms are generated fine. Thanks so much --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---