diff options
author | wei <> | 2007-05-03 01:37:21 +0000 |
---|---|---|
committer | wei <> | 2007-05-03 01:37:21 +0000 |
commit | ea9e7eb535b460218b693d4e5fec80297eb3e360 (patch) | |
tree | 8dc4f4ac6d29989ba912a6013ffa6590c71e857d /framework/Data/ActiveRecord | |
parent | 1ae09931b2572d9c3067c99f841a60cb3330b3f3 (diff) |
Add northwind db demo.
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;
}
}
}
|