diff options
Diffstat (limited to 'Source/SPTableData.m')
-rw-r--r-- | Source/SPTableData.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 311108f2..594d1df4 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -645,8 +645,16 @@ [fieldsParser setString:[[parts objectAtIndex:6] stringByTrimmingCharactersInSet:bracketSet]]; [constraintDetails setObject:[fieldsParser unquotedString] forKey:@"ref_table"]; - [fieldsParser setString:[[parts objectAtIndex:7] stringByTrimmingCharactersInSet:bracketSet]]; - [constraintDetails setObject:[fieldsParser unquotedString] forKey:@"ref_columns"]; + NSMutableArray *refKeyColumns = [NSMutableArray array]; + NSArray *refKeyColumnStrings = [[[parts objectAtIndex:7] stringByTrimmingCharactersInSet:bracketSet] componentsSeparatedByString:@","]; + + for (NSString *keyColumn in refKeyColumnStrings) + { + [fieldsParser setString:[[keyColumn stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] stringByTrimmingCharactersInSet:bracketSet]]; + [refKeyColumns addObject:[fieldsParser unquotedString]]; + } + + [constraintDetails setObject:refKeyColumns forKey:@"ref_columns"]; NSUInteger nextOffs = 12; |