aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableRelations.m
diff options
context:
space:
mode:
authordmoagx <post@wickenrode.com>2013-04-21 21:05:56 +0000
committerdmoagx <post@wickenrode.com>2013-04-21 21:05:56 +0000
commit974a17c6403e75eb23eef4a270ff0d70b37c91de (patch)
tree1c72d942e561659508c67210d926f0e94630a900 /Source/SPTableRelations.m
parent758789b3bba80f91182730841cb54ba0f3c86de4 (diff)
downloadsequelpro-974a17c6403e75eb23eef4a270ff0d70b37c91de.tar.gz
sequelpro-974a17c6403e75eb23eef4a270ff0d70b37c91de.tar.bz2
sequelpro-974a17c6403e75eb23eef4a270ff0d70b37c91de.zip
* Composite Foreign Keys will now show all columns in Relation view (workaround)
Diffstat (limited to 'Source/SPTableRelations.m')
-rw-r--r--Source/SPTableRelations.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m
index 45450bf1..26ab8195 100644
--- a/Source/SPTableRelations.m
+++ b/Source/SPTableRelations.m
@@ -589,9 +589,9 @@ static NSString *SPRelationOnDeleteKey = @"on_delete";
{
[relationData addObject:[NSDictionary dictionaryWithObjectsAndKeys:
[constraint objectForKey:SPRelationNameKey], SPRelationNameKey,
- [[constraint objectForKey:SPRelationColumnsKey] objectAtIndex:0], SPRelationColumnsKey,
+ [[constraint objectForKey:SPRelationColumnsKey] componentsJoinedByCommas], SPRelationColumnsKey,
[constraint objectForKey:@"ref_table"], SPRelationFKTableKey,
- [constraint objectForKey:@"ref_columns"], SPRelationFKColumnsKey,
+ [[constraint objectForKey:@"ref_columns"] componentsJoinedByCommas], SPRelationFKColumnsKey,
([constraint objectForKey:@"update"] ? [constraint objectForKey:@"update"] : @""), SPRelationOnUpdateKey,
([constraint objectForKey:@"delete"] ? [constraint objectForKey:@"delete"] : @""), SPRelationOnDeleteKey,
nil]];
@@ -624,7 +624,7 @@ static NSString *SPRelationOnDeleteKey = @"on_delete";
[tableDataInstance resetAllData];
NSDictionary *tableInfo = [tableDataInstance informationForTable:table];
- NSArray *columns = [tableInfo objectForKey:SPRelationColumnsKey];
+ NSArray *columns = [tableInfo objectForKey:@"columns"];
NSMutableArray *validColumns = [NSMutableArray array];