On Wed, Aug 4, 2010 at 3:26 PM, Mariano C. <mariano.calan...@gmail.com> wrote:
> Alas. nothing change, valid author_id value is still inside array.
>
> Analyzing authors select form appear like:
> <select id="BookAuthorId" name="data[Book][author_id][]">
>
> if I remove last [] on the fly(with Firebug), the insert happen
> without problem cause (I suppose) author_id is no more
>  [author_id] => Array
>                (
>                    [0] => 15
>                )
> but
> [author_id] => 15
>
> Ideas?

The only other thing that looks odd to me is that your $hasMany and
$belongsTo class vars are strings, not arrays. But I just checked the
docs and that's supposedly OK.

What version of Cake are you using?

Also, what does the $authors array look like? It should be just a
simple array, ID as key and name as value. Is it a 2-d array, by any
chance?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to