diff options
Diffstat (limited to 'framework/Data/ActiveRecord')
-rw-r--r-- | framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php index 840e5b63..2f06368e 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php @@ -35,7 +35,11 @@ class TMssqlScaffoldInput extends TScaffoldInputCommon case 'datetime': case 'smalldatetime':
return $this->getDateTimeValue($container,$column, $record);
default:
- return $this->getDefaultControlValue($container,$column, $record);
+ $value = $this->getDefaultControlValue($container,$column, $record);
+ if(trim($value)==='' && $column->getAllowNull())
+ return null;
+ else
+ return $value;
}
}
}
|