私は最初に編集を登録して新しい項目を追加することでこれに取り組んでいます。
まずテーブル "A"は非常にひどい例です... cakephpのテーブルでは、常に複数の名前が付けられます。しかし、とにかくあなたのコントローラの上部には、あなたが持っています
$uses = array("A"); <-- This is you model
私はこのような何かをします。
//First register the update
$this->A->id = $id //$id you will have to somehow post it with form maybe some hidden field
$this->A->set("promocode", $_POST["promocode"]);
$this->A->save();
$this->A->id = null;
//Then register the new entries
foreach($newEntries as $newEntry) {
$this->A->set("promocode", $newEntry["value"]);
$this->A->set("user_id", $userid);
$this->A->save();
$this->A->id = null;
}