Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
newEntity moved to RHManagedObject+legacy.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Meyer committed Mar 30, 2014
1 parent 50d63d6 commit fcdb0b0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions RHManagedObject+legacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
@interface RHManagedObject (legacy)

+(NSEntityDescription *)entityDescription;
+(id)newEntity;

+(id)newOrExistingEntityWithPredicate:(NSPredicate *)predicate;

Expand Down
4 changes: 4 additions & 0 deletions RHManagedObject+legacy.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ +(NSEntityDescription *)entityDescription {
return [self entityDescriptionWithError:nil];
}

+(id)newEntity {
return [self newEntityWithError:nil];
}

+(id)newOrExistingEntityWithPredicate:(NSPredicate *)predicate {
return [self newOrExistingEntityWithPredicate:predicate error:nil];
}
Expand Down
1 change: 0 additions & 1 deletion RHManagedObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ typedef void (^RHDidDeleteBlock)();
+(NSError *)deleteStore;
+(NSError *)commit;

+(id)newEntity;
+(id)newEntityWithError:(NSError **)error;

+(id)newOrExistingEntityWithPredicate:(NSPredicate *)predicate
Expand Down
4 changes: 0 additions & 4 deletions RHManagedObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ +(NSError *)commit {
return nil;
}

+(id)newEntity {
return [self newEntityWithError:nil];
}

+(id)newEntityWithError:(NSError **)error {
return [NSEntityDescription insertNewObjectForEntityForName:[self entityName]
inManagedObjectContext:[self managedObjectContextForCurrentThreadWithError:error]];
Expand Down

0 comments on commit fcdb0b0

Please sign in to comment.