mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-12 22:40:25 +08:00
* Replaces primary key with `RKEntityIdentifier` * Add support for use of compound keys for object identification * Refactor `RKConnectionMapping` to `RKConnectionDescription` and add support for connecting with multiple attributes * Clarify naming of representation key methods to better match naming conventions * Add type transformation support for object identification * Greatly expand test coverage for object identification * Drop the `NSEntityDescription` category * Simplify the `RKManagedObjectCaching` protocol * Add compound key support to the Fetch Request and In Memory Cache implementations * Replace Kiwi with Specta for tests where contexts are helpful for organization * Rename `defaultValueForMissingAttribute` to `defaultValueForAttribute`
27 lines
808 B
Objective-C
27 lines
808 B
Objective-C
//
|
|
// RKConnectionDescription.h
|
|
// RestKit
|
|
//
|
|
// Created by Blake Watters on 11/20/12.
|
|
// Copyright (c) 2012 RestKit. All rights reserved.
|
|
//
|
|
|
|
#import <CoreData/CoreData.h>
|
|
|
|
/**
|
|
*/
|
|
@interface RKConnectionDescription : NSObject <NSCopying>
|
|
|
|
@property (nonatomic, strong, readonly) NSRelationshipDescription *relationship;
|
|
|
|
- (id)initWithRelationship:(NSRelationshipDescription *)relationship attributes:(NSDictionary *)sourceToDestinationEntityAttributes;
|
|
- (id)initWithRelationship:(NSRelationshipDescription *)relationship keyPath:(NSString *)keyPath;
|
|
|
|
@property (nonatomic, copy, readonly) NSDictionary *attributes; // nil unless foreign key
|
|
- (BOOL)isForeignKeyConnection;
|
|
|
|
@property (nonatomic, copy, readonly) NSString *keyPath; // nil unless keyPath description
|
|
- (BOOL)isKeyPathConnection;
|
|
|
|
@end
|