File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -186,9 +186,14 @@ - (NSString*)_resolveKeyPathType:(NSString*)keyPath {
186
186
187
187
NSEntityDescription *entity = self;
188
188
nsenumerate (components, NSString , key) {
189
- NSRelationshipDescription *relationship = [[entity relationshipsByName ] objectForKey: key];
190
- assert (relationship);
191
- entity = [relationship destinationEntity ];
189
+ id property = [[entity propertiesByName ] objectForKey: key];
190
+ if ([property isKindOfClass: [NSAttributeDescription class ]]) {
191
+ NSString *result = [property objectAttributeType ];
192
+ return [result substringToIndex: [result length ] -1 ];
193
+ } else if ([property isKindOfClass: [NSRelationshipDescription class ]]) {
194
+ entity = [property destinationEntity ];
195
+ }
196
+ assert (property);
192
197
}
193
198
194
199
return [entity managedObjectClassName ];
You can’t perform that action at this time.
0 commit comments