Commit 94433f90 authored by doctrine's avatar doctrine

Fixed : Ticket #14

parent 69e3a711
......@@ -561,8 +561,11 @@ abstract class Doctrine_Session extends Doctrine_Configurable implements Countab
if($increment) {
if($k == 0) {
// record uses auto_increment column
$id = $table->getMaxIdentifier();
$id = $this->dbh->lastinsertid();
if( ! $id)
$id = $table->getMaxIdentifier();
}
$record->setID($id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment