mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-15 01:02:15 +08:00
Convert RKConnectionMapping into a subclass of RKPropertyMapping. Add delegate callback for tracking the connection of relationships.
This commit is contained in:
@@ -21,12 +21,11 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
#import "RKMapping.h"
|
||||
#import "RKPropertyMapping.h"
|
||||
|
||||
@class RKConnectionMapping, RKDynamicMappingMatcher;
|
||||
@protocol RKManagedObjectCaching;
|
||||
|
||||
typedef id (^RKObjectConnectionBlock)(RKConnectionMapping *mapping, id source);
|
||||
|
||||
// Defines the rules for connecting relationsips
|
||||
/**
|
||||
Instructs RestKit to connect a relationship of the object being mapped to the
|
||||
@@ -93,11 +92,10 @@ typedef id (^RKObjectConnectionBlock)(RKConnectionMapping *mapping, id source);
|
||||
@see connectRelationship:withObjectForPrimaryKeyAttribute:
|
||||
*/
|
||||
|
||||
@interface RKConnectionMapping : NSObject
|
||||
@interface RKConnectionMapping : RKPropertyMapping
|
||||
|
||||
@property (nonatomic, strong, readonly) NSRelationshipDescription *relationship;
|
||||
@property (nonatomic, strong, readonly) NSString *sourceKeyPath;
|
||||
@property (nonatomic, strong, readonly) NSString *destinationKeyPath;
|
||||
|
||||
@property (nonatomic, strong, readonly) RKDynamicMappingMatcher *matcher; // Can be nil
|
||||
|
||||
// Returns YES if the receiver describes a connection between entities that is established
|
||||
|
||||
Reference in New Issue
Block a user