diff --git a/lib/Cake/Model/Datasource/Database/Sqlserver.php b/lib/Cake/Model/Datasource/Database/Sqlserver.php index 81169b44e..a64c6fd90 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlserver.php +++ b/lib/Cake/Model/Datasource/Database/Sqlserver.php @@ -93,7 +93,10 @@ class Sqlserver extends DboSource { 'text' => array('name' => 'nvarchar', 'limit' => 'MAX'), 'integer' => array('name' => 'int', 'formatter' => 'intval'), 'biginteger' => array('name' => 'bigint'), - 'float' => array('name' => 'numeric', 'formatter' => 'floatval'), + 'numeric' => array('name' => 'decimal', 'formatter' => 'floatval'), + 'decimal' => array('name' => 'decimal', 'formatter' => 'floatval'), + 'float' => array('name' => 'float', 'formatter' => 'floatval'), + 'real' => array('name' => 'float', 'formatter' => 'floatval'), 'datetime' => array('name' => 'datetime', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'), 'timestamp' => array('name' => 'timestamp', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'), 'time' => array('name' => 'datetime', 'format' => 'H:i:s', 'formatter' => 'date'), @@ -441,9 +444,12 @@ class Sqlserver extends DboSource { if (strpos($col, 'binary') !== false || $col === 'image') { return 'binary'; } - if (in_array($col, array('float', 'real', 'decimal', 'numeric'))) { + if (in_array($col, array('float', 'real'))) { return 'float'; } + if (in_array($col, array('decimal', 'numeric'))) { + return 'decimal'; + } return 'text'; }