diff --git a/templates/machine.m.motemplate b/templates/machine.m.motemplate index 6e974ea5..e4fb5c8e 100644 --- a/templates/machine.m.motemplate +++ b/templates/machine.m.motemplate @@ -80,6 +80,7 @@ const struct <$managedObjectClassName$>UserInfo <$managedObjectClassName$>UserIn } <$endif$> +<$if Attribute.name != "type"$> - (<$Attribute.scalarAttributeType$>)primitive<$Attribute.name.initialCapitalString$>Value { NSNumber *result = [self primitive<$Attribute.name.initialCapitalString$>]; return [result <$Attribute.scalarAccessorMethodName$>]; @@ -90,6 +91,7 @@ const struct <$managedObjectClassName$>UserInfo <$managedObjectClassName$>UserIn } <$endif$> <$endif$> +<$endif$> <$endforeach do$> <$foreach Relationship noninheritedRelationships do$> diff --git a/test/test.m b/test/test.m index 52b60c5d..3b84455f 100644 --- a/test/test.m +++ b/test/test.m @@ -58,6 +58,8 @@ int main(int argc, char *argv[]) { ChildMO *bart = [ChildMO insertInManagedObjectContext:moc]; bart.humanName = bart.childName = @"bart"; [bart setIvar:1.0]; + bart.type = [NSNumber numberWithInt:64]; + bart.typeValue++; ChildMO *lisa = [ChildMO insertInManagedObjectContext:moc]; lisa.humanName = lisa.childName = @"lisa"; diff --git a/test/test.xcdatamodel/contents b/test/test.xcdatamodel/contents index 13bb54c2..a344a87f 100644 --- a/test/test.xcdatamodel/contents +++ b/test/test.xcdatamodel/contents @@ -1,8 +1,8 @@ - + - + @@ -79,7 +79,7 @@ - + \ No newline at end of file