From 75579e243a7482d43f03034d86478772e83d096b Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 11 Mar 2009 13:29:03 +0000 Subject: Merge in r391 from trunk, fixing problems with adding rows when "Reload table after adding a row" is disabled --- Source/TableContent.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/TableContent.m b/Source/TableContent.m index 3443a73f..a25a2cf4 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1266,8 +1266,8 @@ // Set the insertId for fields with auto_increment for ( i = 0; i < [theColumns count] ; i++ ) { - if ([[theColumns objectAtIndex:i] objectForKey:@"autoincrement"]) { - [[filteredResult objectAtIndex:currentlyEditingRow] setObject:[NSNumber numberWithLong:[mySQLConnection insertId]] + if ([[[theColumns objectAtIndex:i] objectForKey:@"autoincrement"] intValue]) { + [[filteredResult objectAtIndex:currentlyEditingRow] setObject:[[NSNumber numberWithLong:[mySQLConnection insertId]] description] forKey:[columnNames objectAtIndex:i]]; } } -- cgit v1.2.3