diff --git a/mogenerator.m b/mogenerator.m index 7807b268..8f20e46f 100644 --- a/mogenerator.m +++ b/mogenerator.m @@ -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 {