From 840b19518237894ef85ba7e6550371405ad600db Mon Sep 17 00:00:00 2001 From: Simon Whitaker Date: Wed, 3 Jul 2013 22:22:02 +0100 Subject: [PATCH] Add a warning when skipping an attribute named 'type' --- mogenerator.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mogenerator.m b/mogenerator.m index 22b4c8e1..f6054c75 100644 --- a/mogenerator.m +++ b/mogenerator.m @@ -164,7 +164,10 @@ - (NSArray*)noninheritedAttributesSansType { NSMutableArray *filteredAttributeDescriptions = [NSMutableArray arrayWithCapacity:[attributeDescriptions count]]; nsenumerate(attributeDescriptions, NSAttributeDescription, attributeDescription) { - if (![[attributeDescription name] isEqualToString:@"type"]) { + if ([[attributeDescription name] isEqualToString:@"type"]) { + ddprintf(@"WARNING skipping 'type' attribute on %@ (%@) - see https://github.com/rentzsch/mogenerator/issues/74\n", + self.name, self.managedObjectClassName); + } else { [filteredAttributeDescriptions addObject:attributeDescription]; } }