Ensuring uniqueness of method cache keys, all tests passing now

This commit is contained in:
Jose Lorenzo Rodriguez 2011-07-17 23:45:22 -04:30
parent 08be8300ee
commit 50d4330487
2 changed files with 2 additions and 0 deletions

View file

@ -2183,6 +2183,7 @@ class DboSource extends DataSource {
$virtualFields = $model->getVirtualField(); $virtualFields = $model->getVirtualField();
$cacheKey = array( $cacheKey = array(
$alias, $alias,
get_class($model),
$model->alias, $model->alias,
$virtualFields, $virtualFields,
$fields, $fields,

View file

@ -413,6 +413,7 @@ class ModelWriteTest extends BaseModelTest {
} }
$column .= $this->db->buildColumn(array('name' => 'child_count', 'type' => 'integer')); $column .= $this->db->buildColumn(array('name' => 'child_count', 'type' => 'integer'));
$this->db->query('ALTER TABLE '. $this->db->fullTableName('category_threads') . ' ADD ' . $column); $this->db->query('ALTER TABLE '. $this->db->fullTableName('category_threads') . ' ADD ' . $column);
$this->db->flushMethodCache();
$Category = new CategoryThread(); $Category = new CategoryThread();
$result = $Category->updateAll(array('CategoryThread.name' => "'updated'"), array('CategoryThread.parent_id' => 5)); $result = $Category->updateAll(array('CategoryThread.name' => "'updated'"), array('CategoryThread.parent_id' => 5));
$this->assertFalse(empty($result)); $this->assertFalse(empty($result));