简体   繁体   中英

CakePHP saving data in join table HABTM

CakePHP 2.4 according to the official API docs, I can call Model::saveAll()

however , when I call the function Model::saveAll() , the browser return an error of 101(net::ERR_CONNECTION_RESET)

instead , I can save data in a join table in a complicated way

ex: Actor Model Film Model Actor HABTM Film I have a join table named actor_film

I can do like this

$this->Actor->ActorFilm->save(array("ActorFilm"=>array("actor_id"=>1,"film_id"=>2)));

that's so complicated

Any one can help me ?

PHP 5.3.* when using the method saveAll saveMany & saveAssociated will get an error of 101,

so just ungrade your php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM