Skip to content

Commit b9fd6aa

Browse files
committed
Merge pull request rentzsch#109 from tguthrie/mogenerator
--- Wasnt importing any header when using `mogenerator.customBaseClass` entity userInfo key as `-[NSEntityDescription hasCustomSuperentity]` wasnt aware of the option.
2 parents f671c53 + 5d165f7 commit b9fd6aa

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

mogenerator.m

+9-4
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,16 @@ - (NSArray*)entitiesWithACustomSubclassInConfiguration:(NSString *)configuration
7373

7474
@implementation NSEntityDescription (customBaseClass)
7575
- (BOOL)hasCustomSuperentity {
76-
NSEntityDescription *superentity = [self superentity];
77-
if (superentity) {
78-
return YES;
76+
NSString *forcedBaseClass = [self forcedCustomBaseClass];
77+
if (!forcedBaseClass) {
78+
NSEntityDescription *superentity = [self superentity];
79+
if (superentity) {
80+
return YES;
81+
} else {
82+
return gCustomBaseClass ? YES : NO;
83+
}
7984
} else {
80-
return gCustomBaseClass ? YES : NO;
85+
return YES;
8186
}
8287
}
8388
- (NSString*)customSuperentity {

0 commit comments

Comments
 (0)