Re: hasOne->HABTM save problem

2010-03-05 Thread WebbedIT
Don't go manual otherwise validation of all data before saving becomes messy. Can you debug your $this->data array in the controller and show us how the array is formatted? HTH Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

Re: hasOne->HABTM save problem

2010-03-05 Thread murkyt
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 wrote: > > Cake's auto

Re: hasOne->HABTM save problem

2010-03-05 Thread murkyt
Thanks for your reply Robert. I have the $list['docs'] set up as you describe and I have tried the multiple select field as ExportDocument.ExportDocument but it seems to want to attach that data to the Sample model and not the related ExportSample model which is why I was trying ExportSample.Expor

Re: hasOne->HABTM save problem

2010-03-05 Thread WebbedIT
> 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 believ

Re: hasOne->HABTM save problem

2010-03-05 Thread Robert P
Cake's auto-HABTM saving requires the field to be named a particular way in order to recognise it. Try naming your multiple-select field "ExportDocument.ExportDocument". $list['docs'] should also be in the format array(ExportDocument.id => name) -- Varisan International

Re: hasOne->HABTM save problem

2010-03-05 Thread Robert P
Cake's auto-HABTM saving requires the field to be named a particular way in order to recognise it. Try naming your multiple-select field "ExportDocument.ExportDocument". $list['docs'] should also be in the format array(ExportDocument.id => name) -- Varisan International

hasOne->HABTM save problem

2010-03-04 Thread murkyt
I have the following relationships set up for a database of Samples. There are many different types of sample and each type has it's own set of fields so I have modelled them as Supertype/Subtypes with hasOne relationships. For an ExportSample it can have one or more documents tied to it. Sample h