diff --git a/lib/Doctrine/Connection/UnitOfWork.php b/lib/Doctrine/Connection/UnitOfWork.php index d8effa1c8..e679f96b6 100644 --- a/lib/Doctrine/Connection/UnitOfWork.php +++ b/lib/Doctrine/Connection/UnitOfWork.php @@ -606,7 +606,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module $id = $this->conn->sequence->lastInsertId($seq); if ( ! $id) { - $id = $table->getMaxIdentifier(); + throw new Doctrine_Connection_Exception("Couldn't get last insert identifier."); } $record->assignIdentifier($id); @@ -622,4 +622,4 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module return true; } -} \ No newline at end of file +}