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();
$cacheKey = array(
$alias,
get_class($model),
$model->alias,
$virtualFields,
$fields,

View file

@ -413,6 +413,7 @@ class ModelWriteTest extends BaseModelTest {
}
$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));