Skip to content

Commit

Permalink
Accept -1 or 1 as # of rows on insert.
Browse files Browse the repository at this point in the history
While we generally want 1 row, SQLserver will return -1 as we are using
OUTPUT in insert queries now.

Refs #5104
  • Loading branch information
markstory committed Nov 23, 2014
1 parent 9a76b40 commit cc7d7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Table.php
Expand Up @@ -1323,7 +1323,7 @@ protected function _insert($entity, $data) {
->values($data)
->execute();

if ($statement->rowCount() > 0) {
if ($statement->rowCount() !== 0) {
$success = $entity;
$entity->set($filteredKeys, ['guard' => false]);
foreach ($primary as $key => $v) {
Expand Down

0 comments on commit cc7d7f2

Please sign in to comment.