Added boolean "reversible" property to RKObjectRelationshipMapping. This can be used to break cyclical

relationships in the object mapping graph. Relationships can be optionally included in an inverse mapping
generation for serialization purposes.
This commit is contained in:
Ed McManus
2011-06-11 05:05:30 -07:00
committed by Blake Watters
parent 9299cabc11
commit ecf808af1a
4 changed files with 45 additions and 5 deletions

View File

@@ -213,6 +213,21 @@ relationship. Relationships are processed using an object mapping as well.
*/
- (void)mapKeyPath:(NSString *)sourceKeyPath toRelationship:(NSString*)destinationRelationship withObjectMapping:(RKObjectMapping *)objectMapping;
/**
Instantiate and add an RKObjectRelationshipMapping instance targeting a keyPath within the mappable
source data to a relationship property on the target object.
Used to indicate whether the relationship should be included in serialization.
@param sourceKeyPath A key-value coding keyPath to fetch the mappable value from
@param destinationRelationship The relationship name to assign the mapped value to
@param objectMapping An object mapping to use when processing the nested objects
@param serialize A boolean value indicating whether to include this relationship in serialization
@see mapKeyPath:toRelationship:withObjectMapping:
*/
- (void)mapKeyPath:(NSString *)relationshipKeyPath toRelationship:(NSString*)keyPath withObjectMapping:(RKObjectMapping *)objectMapping serialize:(BOOL)serialize;
/**
Quickly define a group of attribute mappings using alternating keyPath and attribute names. You must provide
an equal number of keyPath and attribute pairs or an exception will be generated.