mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-07 01:41:46 +08:00
Eliminated the use of the ActiveRecord pattern across the library.
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
|
||||
#import "NSManagedObject+RKAdditions.h"
|
||||
#import "NSManagedObjectContext+RKAdditions.h"
|
||||
#import "RKLog.h"
|
||||
#import "RKManagedObjectStore.h"
|
||||
#import "NSEntityDescription+RKAdditions.h"
|
||||
|
||||
@implementation NSManagedObject (RKAdditions)
|
||||
|
||||
@@ -22,4 +25,10 @@
|
||||
return (managedObjectClone == nil) ? YES : NO;
|
||||
}
|
||||
|
||||
- (BOOL)isNew
|
||||
{
|
||||
NSDictionary *vals = [self committedValuesForKeys:nil];
|
||||
return [vals count] == 0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user