diff options
author | rowanbeentje <rowan@beent.je> | 2009-04-14 01:30:00 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-04-14 01:30:00 +0000 |
commit | 8c48542aed7a7e22cb1354f913b6ba90e97bda20 (patch) | |
tree | d0b471f003ed4a37c7011db77502c9df10af425b | |
parent | 68c7afa8cf9936074b2ff60b382f5a523c16ae4e (diff) | |
download | sequelpro-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)
-rw-r--r-- | Source/TableContent.m | 2 |
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"]]; |