Thanks for your reply Paul,

I think that I am trying to get Cake to go too far down the
association chain. I have tried the code you provided and it still
does not save into the HABTM model. I may just have to do a manual
save of the HABTM data.

On Mar 5, 1:08 am, WebbedIT <p...@webbedit.co.uk> wrote:
> > Cake's auto-HABTM saving requires the field to be named a particular
> > way in order to recognise it.
>
> I personally get away with the as follows without issue:
> echo $form->input('ClassificationWhat', array('type'=>'select',
> 'multiple'=>'checkbox', 'options'=>array($classificationWhats));
>
> I believe the problem will be trying to use saveAll tow models away
> from the HABTM association as saveAll does not go infinetly deep, it
> only tends to save immideiatly associated records.
>
> Try:
> $this->Sample->ExportSample->saveAll($this->data,
> array('validate'=>'first'));
>
> This should validate/save all 3 models at once returning all your
> required validation errors to your sample form if required.
>
> HTH
>
> Paul.

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