File tree 3 files changed +11
-1
lines changed
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 21
21
@end
22
22
23
23
@interface NSEntityDescription (customBaseClass)
24
+ - (BOOL )hasSuperentity ;
24
25
- (BOOL )hasCustomSuperentity ;
25
26
- (NSString *)customSuperentity ;
26
27
- (NSString *)forcedCustomBaseClass ;
Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ - (BOOL)hasCustomBaseCaseImport {
79
79
- (NSString *)baseClassImport {
80
80
return gCustomBaseClassImport ;
81
81
}
82
+ - (BOOL )hasSuperentity {
83
+ NSEntityDescription *superentity = [self superentity ];
84
+ if (superentity) {
85
+ return YES ;
86
+ }
87
+ return NO ;
88
+ }
89
+
82
90
- (BOOL )hasCustomSuperentity {
83
91
NSString *forcedBaseClass = [self forcedCustomBaseClass ];
84
92
if (!forcedBaseClass) {
Original file line number Diff line number Diff line change 2
2
// Make changes to <$managedObjectClassName$>.h instead.
3
3
4
4
#import <CoreData/CoreData.h>
5
- <$if hasCustomSuperentity$>#import <$if hasCustomBaseCaseImport$><$baseClassImport$><$else$>"<$customSuperentity$>.h"<$endif$><$endif$>
5
+ <$if hasCustomSuperentity$><$if hasSuperentity$>#import "<$customSuperentity$>.h"
6
+ <$else$><$if hasCustomBaseCaseImport$>#import <$baseClassImport$><$else$>#import "<$customSuperentity$>.h"<$endif$><$endif$><$endif$>
6
7
7
8
extern const struct <$managedObjectClassName$>Attributes {<$foreach Attribute noninheritedAttributes do$>
8
9
<$if TemplateVar.arc$>__unsafe_unretained<$endif$> NSString *<$Attribute.name$>;<$endforeach do$>
You can’t perform that action at this time.
0 commit comments