Skip to content

Commit

Permalink
Merge pull request #165 from simonwhitaker/add-type-attribute-warning
Browse files Browse the repository at this point in the history
[CHANGE] Add a warning when skipping an attribute named 'type'. (Simon Whitaker)
  • Loading branch information
rentzsch committed Jul 3, 2013
2 parents 1a2788e + 840b195 commit 5bfc6d6
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 5bfc6d6

Please sign in to comment.