From 8d04d249d4c9e3b843e801c16bf2be60afefc7b3 Mon Sep 17 00:00:00 2001 From: Thomas Guthrie Date: Tue, 8 May 2012 13:57:12 +0100 Subject: [PATCH] [FIX] Missing import with per entity base class --- mogenerator.m | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 {