aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-14 01:30:00 +0000
committerrowanbeentje <rowan@beent.je>2009-04-14 01:30:00 +0000
commit8c48542aed7a7e22cb1354f913b6ba90e97bda20 (patch)
treed0b471f003ed4a37c7011db77502c9df10af425b /Source/TableContent.m
parent68c7afa8cf9936074b2ff60b382f5a523c16ae4e (diff)
downloadsequelpro-8c48542aed7a7e22cb1354f913b6ba90e97bda20.tar.gz
sequelpro-8c48542aed7a7e22cb1354f913b6ba90e97bda20.tar.bz2
sequelpro-8c48542aed7a7e22cb1354f913b6ba90e97bda20.zip
- When adding a new row, insert the pref-set value for NULL if the default value is NULL (fixes Issue #229)
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 2a359d07..e28cf44e 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -692,7 +692,7 @@
columns = [[NSArray alloc] initWithArray:[tableDataInstance columns]];
for ( i = 0 ; i < [columns count] ; i++ ) {
column = [columns objectAtIndex:i];
- if ([column objectForKey:@"default"] == nil) {
+ if ([column objectForKey:@"default"] == nil || [[column objectForKey:@"default"] isEqualToString:@"NULL"]) {
[newRow setObject:[prefs stringForKey:@"NullValue"] forKey:[column objectForKey:@"name"]];
} else {
[newRow setObject:[column objectForKey:@"default"] forKey:[column objectForKey:@"name"]];