mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: MSSQL does not support double, using float instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90928 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e3f4c266e3
commit
edf7d4a134
@ -7,8 +7,15 @@
|
|||||||
class Double extends DBField {
|
class Double extends DBField {
|
||||||
|
|
||||||
function requireField() {
|
function requireField() {
|
||||||
|
|
||||||
|
// 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");
|
DB::requireField($this->tableName, $this->name, "double");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Nice() {
|
function Nice() {
|
||||||
return number_format($this->value, 2);
|
return number_format($this->value, 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user