Skip to content

Commit

Permalink
Merge pull request rentzsch#165 from simonwhitaker/add-type-attribute…
Browse files Browse the repository at this point in the history
…-warning

[CHANGE] Add a warning when skipping an attribute named 'type'. (Simon Whitaker)
  • Loading branch information
rentzsch committed Jul 3, 2013
2 parents 717ecba + 4ea1192 commit 1b7c873
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 1b7c873

Please sign in to comment.