From 5f1165698b6f1f94f43571283d9644394ec03315 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 19 Jan 2009 05:12:28 +0000 Subject: Change ORM and the MySql driver to clear static caches using clear_cache(). This supercedes the TEST_MODE checks. Upstream ticket: http://dev.kohanaphp.com/ticket/1062 --- kohana/libraries/ORM.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kohana/libraries/ORM.php') diff --git a/kohana/libraries/ORM.php b/kohana/libraries/ORM.php index 72aab746..0783ebcd 100644 --- a/kohana/libraries/ORM.php +++ b/kohana/libraries/ORM.php @@ -890,7 +890,7 @@ class ORM_Core { { if ($force === TRUE OR empty($this->table_columns)) { - if (!TEST_MODE && isset(self::$column_cache[$this->object_name])) + if (isset(self::$column_cache[$this->object_name])) { // Use cached column information $this->table_columns = self::$column_cache[$this->object_name]; @@ -1105,6 +1105,8 @@ class ORM_Core { // Proxy to database $this->db->clear_cache($sql); + self::$column_cache = array(); + return $this; } -- cgit v1.2.3