0
我有幾個表(mySQL),我想借助Doctrine進行更新。該產品表ID是自動遞增,並在這裏對我願做一個簡要說明:Mysql_insert_id與Doctrine
$prod = new Products();
$prod->type = '0';
$categ = new CategoriesToProducts();
$categ->cat = '111';
$categ->product = $prod->id;
$conn = Doctrine_Manager::connection();
$conn->flush();
我怎樣才能做到這一點,而在使用沖洗?使用常規保存是另一種選擇,但在執行此操作時會有多個事務。 我試圖找到教條的Mysql_insert_id版本,但沒有任何運氣。
謝謝!