Ok, I've browsed around in the code, but I can't seem to find a convenient 
method that will get you the last generated  id. 

I found Doctrine\DBAL\Driver\OCI8\OCI8Connection::lastInsertId(), but it looks 
like you're not using the OCI8 driver.

Fortunately it looks like it isn't hard to fetch the generated id manually. 
Basically you do this query:

    SELECT <sequence-name>.CURRVAL FROM DUAL

Replace <sequence-name> with the name of the sequence that is used.
Wrap this in a method of your own and you should be good to go!

-- 
Jasper N. Brouwer
(@jaspernbrouwer)


On 22 Jan 2014, at 20:23, Kayan Sampaio <[email protected]> wrote:

> PDOException: SQLSTATE[IM001]: Driver does not support this function: driver 
> does not support lastInsertId()

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to