Permalink
Browse files

PR #3695

Merge branch 'eminetto-fix_oracle'
  • Loading branch information...
2 parents 5257f3e + cc27ba7 commit f0e405668372b1e5d625d374b299c05e814aecd3 @ralphschindler ralphschindler committed Apr 16, 2013
Showing with 5 additions and 6 deletions.
  1. +1 −1 library/Zend/Db/Adapter/Adapter.php
  2. +4 −5 library/Zend/Db/TableGateway/Feature/SequenceFeature.php
View
2 library/Zend/Db/Adapter/Adapter.php
@@ -309,7 +309,7 @@ protected function createDriver($parameters)
/**
* @param Driver\DriverInterface $driver
- * @return Platform\PlatformInterface
+ * @return Platform\PlatformInterface
*/
protected function createPlatform($parameters)
{
View
9 library/Zend/Db/TableGateway/Feature/SequenceFeature.php
@@ -41,7 +41,9 @@ public function __construct($primaryKeyField, $sequenceName)
$this->sequenceName = $sequenceName;
}
-
+ /**
+ * @param Insert $insert
+ */
public function preInsert(Insert $insert)
{
$columns = $insert->getRawState('columns');
@@ -56,10 +58,7 @@ public function preInsert(Insert $insert)
if ($this->sequenceValue === null)
return $insert;
- array_push($columns, $this->primaryKeyField);
- array_push($values, $this->sequenceValue);
- $insert->columns($columns);
- $insert->values($values);
+ $insert->values(array($this->primaryKeyField => $this->sequenceValue), Insert::VALUES_MERGE);
return $insert;
}

0 comments on commit f0e4056

Please sign in to comment.