BUGFIX: MSSQL does not support double, using float instead (from r90928)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@90934 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-11-05 22:49:26 +00:00 committed by Sam Minnee
parent 3b794bb97a
commit 3ccada55ab

View File

@ -7,7 +7,14 @@
class Double extends DBField { class Double extends DBField {
function requireField() { function requireField() {
DB::requireField($this->tableName, $this->name, "double");
// HACK: MSSQL does not support double so we're usinf float instead
// @todo This should go into MSSQLDatabase ideally somehow
if(DB::getConn() instanceof MSSQLDatabase) {
DB::requireField($this->tableName, $this->name, "float");
} else {
DB::requireField($this->tableName, $this->name, "double");
}
} }
function Nice() { function Nice() {