From e01f4a945279605ae5b674b61e0bee752e8d933d Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Fri, 1 Mar 2013 00:53:17 +0000 Subject: - Fix handling of primary keys listing multiple fields of which an early field has a specified length, addressing Issue #1641 --- Source/SPTableData.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 0de1e651..311108f2 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -718,7 +718,7 @@ // add dict root "primarykeyfield" = for faster accessing else if( [NSArrayObjectAtIndex(parts, 0) hasPrefix:@"PRIMARY"] && [parts count] == 3) { SPSQLParser *keyParser = [SPSQLParser stringWithString:NSArrayObjectAtIndex(parts, 2)]; - keyParser = [SPSQLParser stringWithString:[keyParser stringFromCharacter:'(' toCharacter:')' inclusively:NO]]; + keyParser = [SPSQLParser stringWithString:[keyParser stringFromCharacter:'(' toCharacter:')' inclusively:NO skippingBrackets:YES]]; NSArray *primaryKeyQuotedNames = [keyParser splitStringByCharacter:',']; if ([keyParser length]) { NSMutableArray *primaryKeyFields = [NSMutableArray array]; -- cgit v1.2.3