Skip to content

Commit

Permalink
This commit fixes rentzsch#339. Check for empty module name (leading …
Browse files Browse the repository at this point in the history
…'.') and remove it from the representedClasName.
  • Loading branch information
johnclayton committed Apr 1, 2019
1 parent 797dcd5 commit 84abc62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions momcom/NSEntityDescription+momcom.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ + (NSEntityDescription *)baseEntityForXML:(NSXMLElement *)xmlNode
if ([attributeName isEqualToString:@"name"]) {
[entityDescription setName:attributeString];
} else if ([attributeName isEqualToString:@"representedClassName"]) {
if ([attributeString hasPrefix:@"."]) {
attributeString = [attributeString substringFromIndex:1];
}
[entityDescription setManagedObjectClassName:attributeString];
} else if ([attributeName isEqualToString:@"elementID"]) {
[entityDescription setRenamingIdentifier:attributeString];
Expand Down

0 comments on commit 84abc62

Please sign in to comment.