Closed 3lvis closed 9 years ago
Would be great to have a method that by sending a relationship, an index and an attribute would return a key
NSString *flatKey = [NSString hyp_keyWithRelationship:@"contacts" index:2 attribute:@"first_name"]; // contacts[2].first_name
NSString *flatKey = [NSString hyp_keyWithRelationship:@"contacts" index:2]; // contacts[2]
NSString *flatKey = [NSString hyp_keyWithRelationship:@"company" attribute:@"name"]; // company.name
NSString *flatKey = [@"contacts[2].first_name" hyp_updateRelationshipIndex:3]; // contacts[3].first_name
I was thinking about this when doing the pull request, this would be amazing.
Fixed
Would be great to have a method that by sending a relationship, an index and an attribute would return a key