TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✓ |
Maintained by Elvis Nuñez.
By default NSEntityDescription-SYNCPrimaryKey gives id
for remote primary key and id
for the local primary key.
You can mark any attribute as primary key by adding hyper.isPrimaryKey
and the value YES
or true
. You can also map it to any remote JSON attribute by adding hyper.remoteKey
and the value the primary key in your JSON or remote entity such as contract_id
.
NSEntityDescription-SYNCPrimaryKey will first look for a custom local primary key, then it will look for id
and finally for remoteID
, if after this no primary key is found, it will crash and burn.
- (NSAttributeDescription *)sync_primaryKeyAttribute;
- (NSString *)sync_localPrimaryKey;
- (NSString *)sync_remotePrimaryKey;
NSEntityDescription-SYNCPrimaryKey is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'NSEntityDescription-SYNCPrimaryKey'
SyncDB, [email protected]
NSEntityDescription-SYNCPrimaryKey is available under the MIT license. See the LICENSE file for more info.