diff --git a/mogenerator.m b/mogenerator.m index 148754fa..784f8c87 100644 --- a/mogenerator.m +++ b/mogenerator.m @@ -201,6 +201,11 @@ - (NSString*)forcedCustomBaseClass { return userInfoCustomBaseClass ? userInfoCustomBaseClass : gCustomBaseClassForced; } /** @TypeInfo NSAttributeDescription */ +- (NSArray*)allAttributes { + NSArray *sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]]; + return [[[self attributesByName] allValues] sortedArrayUsingDescriptors:sortDescriptors]; +} +/** @TypeInfo NSAttributeDescription */ - (NSArray*)noninheritedAttributes { NSArray *sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]]; NSEntityDescription *superentity = [self superentity]; @@ -233,7 +238,12 @@ - (NSArray*)noninheritedAttributesSansType { } return filteredAttributeDescriptions; } -/** @TypeInfo NSAttributeDescription */ +/** @TypeInfo NSRelationshipDescription */ +- (NSArray*)allRelationships { + NSArray *sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]]; + return [[[self relationshipsByName] allValues] sortedArrayUsingDescriptors:sortDescriptors]; +} +/** @TypeInfo NSRelationshipDescription */ - (NSArray*)noninheritedRelationships { NSArray *sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]]; NSEntityDescription *superentity = [self superentity];