Permalink
Browse files

Merge branch 'hotfix/3871'

Close #3871
Fixes #3862
  • Loading branch information...
2 parents dbb8fa0 + 2f4ca65 commit dfb4caaee4a710244bd91897da5fcdab2c8245bd @weierophinney weierophinney committed Mar 11, 2013
@@ -205,10 +205,13 @@ public function delete()
$statement = $this->sql->prepareStatementForSqlObject($this->sql->delete()->where($where));
$result = $statement->execute();
- if ($result->getAffectedRows() == 1) {
+ $affectedRows = $result->getAffectedRows();
+ if ($affectedRows == 1) {
// detach from database
$this->primaryKeyData = null;
}
+
+ return $affectedRows;
}
/**
@@ -208,6 +208,7 @@ public function testDelete()
$this->rowGateway->foo = 'bar';
$affectedRows = $this->rowGateway->delete();
$this->assertFalse($this->rowGateway->rowExistsInDatabase());
+ $this->assertEquals(1, $affectedRows);
}
/**

0 comments on commit dfb4caa

Please sign in to comment.