|
4 | 4 | #import "_<$managedObjectClassName$>.h"
|
5 | 5 |
|
6 | 6 | <$if noninheritedAttributes.@count > 0$>
|
7 |
| -const struct <$managedObjectClassName$>Attributes <$managedObjectClassName$>Attributes = {<$foreach Attribute noninheritedAttributes do$> |
8 |
| - .<$Attribute.name$> = @"<$Attribute.name$>",<$endforeach do$> |
9 |
| -}; |
| 7 | +@implementation <$managedObjectClassName$>Attributes <$foreach Attribute noninheritedAttributes do$> |
| 8 | ++ (NSString *)<$Attribute.name$> { |
| 9 | + return @"<$Attribute.name$>"; |
| 10 | +}<$endforeach do$> |
| 11 | +@end |
10 | 12 | <$endif$>
|
11 | 13 |
|
12 | 14 | <$if noninheritedRelationships.@count > 0$>
|
13 |
| -const struct <$managedObjectClassName$>Relationships <$managedObjectClassName$>Relationships = {<$foreach Relationship noninheritedRelationships do$> |
14 |
| - .<$Relationship.name$> = @"<$Relationship.name$>",<$endforeach do$> |
15 |
| -}; |
| 15 | +@implementation <$managedObjectClassName$>Relationships <$foreach Relationship noninheritedRelationships do$> |
| 16 | ++ (NSString *)<$Relationship.name$> { |
| 17 | + return @"<$Relationship.name$>"; |
| 18 | +}<$endforeach do$> |
| 19 | +@end |
16 | 20 | <$endif$>
|
17 | 21 |
|
18 | 22 | <$if noninheritedFetchedProperties.@count > 0$>
|
19 |
| -const struct <$managedObjectClassName$>FetchedProperties <$managedObjectClassName$>FetchedProperties = {<$foreach FetchedProperty noninheritedFetchedProperties do$> |
20 |
| - .<$FetchedProperty.name$> = @"<$FetchedProperty.name$>",<$endforeach do$> |
21 |
| -}; |
| 23 | +@implementation <$managedObjectClassName$>FetchedProperties <$foreach FetchedProperty noninheritedFetchedProperties do$> |
| 24 | ++ (NSString *)<$FetchedProperty.name$> { |
| 25 | + return @"<$FetchedProperty.name$>"; |
| 26 | +}<$endforeach do$> |
| 27 | +@end |
22 | 28 | <$endif$>
|
23 | 29 |
|
24 | 30 | <$if hasUserInfoKeys$>
|
25 |
| -const struct <$managedObjectClassName$>UserInfo <$managedObjectClassName$>UserInfo = {<$foreach UserInfo userInfoKeyValues do$> |
26 |
| - .<$UserInfo.key$> = @"<$UserInfo.value$>",<$endforeach do$> |
27 |
| -}; |
| 31 | +@implementation <$managedObjectClassName$>UserInfo <$foreach UserInfo userInfoKeyValues do$> |
| 32 | ++ (NSString *)<$UserInfo.key$> { |
| 33 | + return @"<$UserInfo.value$>"; |
| 34 | +}<$endforeach do$> |
| 35 | +@end |
28 | 36 | <$endif$>
|
29 | 37 |
|
30 | 38 | @implementation <$managedObjectClassName$>ID
|
|
0 commit comments