Skip to content

Commit

Permalink
Add a warning when skipping an attribute named 'type'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Whitaker committed Jul 3, 2013
1 parent 1a2788e commit 840b195
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mogenerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand Down

0 comments on commit 840b195

Please sign in to comment.