cakephp save array field (hasMany)

SpiffType

New Member
I have an array field in the HTML:\[code\]< input type="text" name="WineDescripcion[Description][]" />\[/code\]This field can be duplicated by clicking a button, How can I save it into the model trough the controller ?This is my current code:\[code\]$this->Vino->VinoDescription->save($this->data);\[/code\]But this returns an SQL error:\[code\]Query: INSERT INTO `vino_description` (`subtitulo`, `descripcion`, `id_vino`) VALUES (Array, Array, 60) \[/code\]Also if I try to change the name in the HTML to:\[code\]< input type="text" name="WineDescripcion[][Description]" />\[/code\]That works, but only saves 1 record with "NULL" values. Thanks in advanced.
 
Back
Top