Skip to content

Commit

Permalink
Merge pull request rentzsch#109 from tguthrie/mogenerator
Browse files Browse the repository at this point in the history
---

Wasnt importing any header when using `mogenerator.customBaseClass` entity userInfo key as `-[NSEntityDescription hasCustomSuperentity]` wasnt aware of the option.
  • Loading branch information
rentzsch committed May 10, 2012
2 parents f671c53 + 5d165f7 commit b9fd6aa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions mogenerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,16 @@ - (NSArray*)entitiesWithACustomSubclassInConfiguration:(NSString *)configuration

@implementation NSEntityDescription (customBaseClass)
- (BOOL)hasCustomSuperentity {
NSEntityDescription *superentity = [self superentity];
if (superentity) {
return YES;
NSString *forcedBaseClass = [self forcedCustomBaseClass];
if (!forcedBaseClass) {
NSEntityDescription *superentity = [self superentity];
if (superentity) {
return YES;
} else {
return gCustomBaseClass ? YES : NO;
}
} else {
return gCustomBaseClass ? YES : NO;
return YES;
}
}
- (NSString*)customSuperentity {
Expand Down

0 comments on commit b9fd6aa

Please sign in to comment.