In Controller I do "$this->Denouncement->saveAll($this->data)" and all saves correctly excepting for one relation: Denouncements hasMany Sections and Sections hasMay SectionParts. Sections saved correctly (Denouncement hasMany Section) but SectionParts are not being saved, i guess because I'm including SectionParts inside the data[Section] array. But then how can I tell cake that 'X' SectionPart belongs to 'Y' Section if SectionParts are outside data[Section] and I dont have Section id yet
The generic explanation: I'm saving to one main table with several kind of relations by sending all in a single array. One is a nested relation, 'main table' (denouncements) hasMany other-object (sections) which hasMany another-object (section_parts). Sending to saveAll in a single array i'm being able to save on to sections, how should section_parts should be placed so cake identify to which section they belong. I hope this is 'understandable' =S I'm sending to DB: ...& data[Section][0][user_given_name]=asdf& data[Section][0][type]=6& data[Section][0][SectionPart][0][name]=embed& data[Section][0][SectionPart][0][value]=<object width="425"...</ object>& data[Section][0][SectionPart][0][type]=embed& data[Section][0][SectionPart][1][name]=top_left_img& data[Section][0][SectionPart][1][value]=/site/files/user_uploaded_imgs/ 20090423T050438.jpg& data[Section][0][SectionPart][1][type]=img& data[Section][0][SectionPart][2][name]=bottom_left_img& data[Section][0][SectionPart][2][value]=/site/files/user_uploaded_imgs/ 20090423T050439.jpg& data[Section][0][SectionPart][2][type]=img& data[Section][1][user_given_name]=ajksdfljasdfjlh& data[Section][1][type]=0& data[Section][1][SectionPart][0][name]=title& data[Section][1][SectionPart][0][value]=ajksdfljasdfjlh& data[Section][1][SectionPart][0][type]=text& data[Section][1][SectionPart][1][name]=text& data[Section][1][SectionPart][1][value]=ljsa kd ljkasdlkj& data[Section][1][SectionPart][1][type]=text Sections are saved correctly, however, SectionParts are ignored, no error nor warning appears Thanks a lot for any help --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---