Skip to content

Commit

Permalink
Parse "ordered" attribute, see #290
Browse files Browse the repository at this point in the history
Adds support for ordered relationships.
  • Loading branch information
otaran committed Jun 26, 2015
1 parent f0d9b7d commit 675479a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions momcom/NSRelationshipDescription+momcom.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ + (NSRelationshipDescription *)baseEntityForXML:(NSXMLElement *)xmlNode;
[relationshipDescription setDeleteRule:NSDenyDeleteRule];
}
}
NSXMLNode *orderedNode = [xmlNode attributeForName:@"ordered"];
if (orderedNode != nil) {
NSString *orderedString = [orderedNode stringValue];
if ([orderedString isEqualToString:@"YES"]) {
[relationshipDescription setOrdered:YES];
}
}

// Destination entity and inverse are not handled here, they get post processed once related entities exist.

Expand Down

0 comments on commit 675479a

Please sign in to comment.