Skip to content

Commit

Permalink
Ensuring uniqueness of method cache keys, all tests passing now
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jul 18, 2011
1 parent 08be830 commit 50d4330
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -2183,6 +2183,7 @@ public function fields($model, $alias = null, $fields = array(), $quote = true)
$virtualFields = $model->getVirtualField();
$cacheKey = array(
$alias,
get_class($model),
$model->alias,
$virtualFields,
$fields,
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Test/Case/Model/ModelWriteTest.php
Expand Up @@ -413,6 +413,7 @@ public function testCounterCacheWithSelfJoin() {
}
$column .= $this->db->buildColumn(array('name' => 'child_count', 'type' => 'integer'));
$this->db->query('ALTER TABLE '. $this->db->fullTableName('category_threads') . ' ADD ' . $column);
$this->db->flushMethodCache();
$Category = new CategoryThread();
$result = $Category->updateAll(array('CategoryThread.name' => "'updated'"), array('CategoryThread.parent_id' => 5));
$this->assertFalse(empty($result));
Expand Down

0 comments on commit 50d4330

Please sign in to comment.