I have two models: Action HABTM Image
I don't have a form 'cause I'm generating the Post data with code outside of cakephp. In the Post I'm sending this data to the ActionController to be saved:
data[Action][id] = 5e0ece37-bc8a-4bb9-a95d-1572dcfb4a96
data[Action][action_type_id] = 69c34b29-c247-11e1-b880-f46d04737d8a
data[Image][0][id] = 9d8c1ade-2b1b-48be-a4be-f9d3176601fc
data[Image][0][url] = file%3A%2F%2F%2Fmnt%2Fsdcard%2FDCIM%2FCamera%220120702_140539.jpg
data[Image][0][action_id] = 5e0ece37-bc8a-4bb9-a95d-1572dcfb4a96
data[Image][1][id] = 7cc3f6e4-7143-41ef-b98d-a766b8b1fffe
data[Image][1][url] = file%3A%2F%2F%2Fmnt%2Fsdcard%2FDCIM%2FCamera%220130702_140539.jpg
data[Image][1][action_id] = 5e0ece37-bc8a-4bb9-a95d-1572dcfb4a96
By now only the Action is saved when I call saveAll($this->data). I haven't been able to find an example where the two related models are saved the same time, but only one model and the record in the join table (actions_images). ¿Is there a way to do this with saveAll? ¿Or do I need to save the models separately?