This commit is contained in:
parent
13783ed267
commit
278bafbc93
@ -320,15 +320,18 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module implemen
|
|||||||
$id = $this->conn->sequence->nextId($seq);
|
$id = $this->conn->sequence->nextId($seq);
|
||||||
$name = $record->getTable()->getIdentifier();
|
$name = $record->getTable()->getIdentifier();
|
||||||
$array[$name] = $id;
|
$array[$name] = $id;
|
||||||
|
|
||||||
|
$record->assignIdentifier($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->conn->insert($table->getTableName(), $array);
|
$this->conn->insert($table->getTableName(), $array);
|
||||||
|
|
||||||
if (count($keys) == 1 && $keys[0] == $table->getIdentifier()) {
|
if (empty($seq) && count($keys) == 1 && $keys[0] == $table->getIdentifier()) {
|
||||||
$id = $this->conn->getDBH()->lastInsertID();
|
$id = $this->conn->sequence->lastInsertId();
|
||||||
|
|
||||||
if ( ! $id)
|
if ( ! $id) {
|
||||||
$id = $table->getMaxIdentifier();
|
$id = $table->getMaxIdentifier();
|
||||||
|
}
|
||||||
|
|
||||||
$record->assignIdentifier($id);
|
$record->assignIdentifier($id);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user