From 49a48ced892410a27281f186bd1d52abccd04ce7 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 3 Feb 2012 21:53:32 -0500 Subject: [PATCH] Don't restrict to BASE_TABLE. This allows Views, and custom table types to be connected to models in SqlServer. Fixes #2529 --- lib/Cake/Model/Datasource/Database/Sqlserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Model/Datasource/Database/Sqlserver.php b/lib/Cake/Model/Datasource/Database/Sqlserver.php index edb29603d..1db5bed09 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlserver.php +++ b/lib/Cake/Model/Datasource/Database/Sqlserver.php @@ -174,7 +174,7 @@ class Sqlserver extends DboSource { if ($cache !== null) { return $cache; } - $result = $this->_execute("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'"); + $result = $this->_execute("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES"); if (!$result) { $result->closeCursor();