diff --git a/mogenerator.m b/mogenerator.m index ef889b47..e8888a51 100644 --- a/mogenerator.m +++ b/mogenerator.m @@ -128,6 +128,18 @@ - (NSArray*)noninheritedAttributes { } } /** @TypeInfo NSAttributeDescription */ +- (NSArray*)noninheritedAttributesSansType { + NSArray *attributeDescriptions = [self noninheritedAttributes]; + NSMutableArray *filteredAttributeDescriptions = [NSMutableArray arrayWithCapacity:[attributeDescriptions count]]; + + nsenumerate(attributeDescriptions, NSAttributeDescription, attributeDescription) { + if (![[attributeDescription name] isEqualToString:@"type"]) { + [filteredAttributeDescriptions addObject:attributeDescription]; + } + } + return filteredAttributeDescriptions; +} +/** @TypeInfo NSAttributeDescription */ - (NSArray*)noninheritedRelationships { NSArray *sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]]; NSEntityDescription *superentity = [self superentity]; diff --git a/templates/machine.h.motemplate b/templates/machine.h.motemplate index b96550b7..a6ff7549 100644 --- a/templates/machine.h.motemplate +++ b/templates/machine.h.motemplate @@ -103,7 +103,7 @@ extern const struct <$managedObjectClassName$>FetchedProperties {<$foreach Fetch <$endif$><$endforeach do$> @interface _<$managedObjectClassName$> (CoreDataGeneratedPrimitiveAccessors) -<$foreach Attribute noninheritedAttributes do$> +<$foreach Attribute noninheritedAttributesSansType do$> <$if Attribute.hasDefinedAttributeType$> - (<$Attribute.objectAttributeType$>)primitive<$Attribute.name.initialCapitalString$>; - (void)setPrimitive<$Attribute.name.initialCapitalString$>:(<$Attribute.objectAttributeType$>)value; diff --git a/test/test.xcdatamodel/elements b/test/test.xcdatamodel/elements index 91c6c42d..1d031425 100644 Binary files a/test/test.xcdatamodel/elements and b/test/test.xcdatamodel/elements differ diff --git a/test/test.xcdatamodel/layout b/test/test.xcdatamodel/layout index 68c15674..a10ff375 100644 Binary files a/test/test.xcdatamodel/layout and b/test/test.xcdatamodel/layout differ