Permalink
Browse files

Merge pull request #109 from tguthrie/mogenerator

---

Wasnt importing any header when using `mogenerator.customBaseClass` entity userInfo key as `-[NSEntityDescription hasCustomSuperentity]` wasnt aware of the option.
  • Loading branch information...
2 parents fdb861b + 8d04d24 commit 61165c611dd6ce0e03df28c7e7eff81424fcee8a @rentzsch committed May 10, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 mogenerator.m
View
@@ -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 {

0 comments on commit 61165c6

Please sign in to comment.