I am using Doctrine/DBAL quite long time, but I have a little problem using executeUpdate and getting the last insert Id. It always returns 0 , but the DB Entry is set. the coloumn id is set and it is AutoIncrement and PRIMARY in my DB.
Here is the function which copies my entry to another table.
$copy = $app['db']->executeUpdate('INSERT INTO `pd_user_model` (
`campaign_id`,
...
`created`)
SELECT `campaign_id`,
...
NOW()
FROM `pd_pass_model` WHERE `campaign_id` = ?', array($campaignID));
echo "INSERT<br>";
echo "LAST INSERT:" . $app['db']->lastInsertId();
//RETURN VALUE
INSERT
LAST INSERT:0
Anybody any hints for me. Thanks so far!