mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-11 10:04:16 +08:00
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:
committed by
Blake Watters
parent
9299cabc11
commit
ecf808af1a
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user