Skip to content

Commit

Permalink
[DEV] Check in differently-generated test mule files.
Browse files Browse the repository at this point in the history
  • Loading branch information
rentzsch committed Nov 2, 2009
1 parent caf3732 commit 7d01950
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
7 changes: 6 additions & 1 deletion mogeneratorTestMule/MOs/_ChildMO.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ @implementation ChildMOID
@implementation _ChildMO

+ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ {
return [NSEntityDescription insertNewObjectForEntityForName:@"Child" inManagedObjectContext:moc_];
NSParameterAssert(moc_);
return [NSEntityDescription insertNewObjectForEntityForName:@"Child" inManagedObjectContext:moc_];
}

- (ChildMOID*)objectID {
Expand Down Expand Up @@ -37,7 +38,11 @@ + (NSArray*)fetchByParent:(NSManagedObjectContext*)moc_ parent:(ParentMO*)parent
NSError *error = nil;
NSArray *result = [self fetchByParent:moc_ parent:parent_ error:&error];
if (error) {
#if TARGET_OS_IPHONE
NSLog(@"error: %@", error);
#else
[NSApp presentError:error];
#endif
}
return result;
}
Expand Down
15 changes: 14 additions & 1 deletion mogeneratorTestMule/MOs/_HumanMO.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ @implementation HumanMOID
@implementation _HumanMO

+ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ {
return [NSEntityDescription insertNewObjectForEntityForName:@"Human" inManagedObjectContext:moc_];
NSParameterAssert(moc_);
return [NSEntityDescription insertNewObjectForEntityForName:@"Human" inManagedObjectContext:moc_];
}

- (HumanMOID*)objectID {
Expand Down Expand Up @@ -46,7 +47,11 @@ + (NSArray*)fetchByHumanName:(NSManagedObjectContext*)moc_ humanName:(NSString*)
NSError *error = nil;
NSArray *result = [self fetchByHumanName:moc_ humanName:humanName_ error:&error];
if (error) {
#if TARGET_OS_IPHONE
NSLog(@"error: %@", error);
#else
[NSApp presentError:error];
#endif
}
return result;
}
Expand Down Expand Up @@ -74,7 +79,11 @@ + (id)fetchOneByHumanName:(NSManagedObjectContext*)moc_ humanName:(NSString*)hum
NSError *error = nil;
id result = [self fetchOneByHumanName:moc_ humanName:humanName_ error:&error];
if (error) {
#if TARGET_OS_IPHONE
NSLog(@"error: %@", error);
#else
[NSApp presentError:error];
#endif
}
return result;
}
Expand Down Expand Up @@ -120,7 +129,11 @@ + (NSArray*)fetchAllHumans:(NSManagedObjectContext*)moc_ {
NSError *error = nil;
NSArray *result = [self fetchAllHumans:moc_ error:&error];
if (error) {
#if TARGET_OS_IPHONE
NSLog(@"error: %@", error);
#else
[NSApp presentError:error];
#endif
}
return result;
}
Expand Down
3 changes: 2 additions & 1 deletion mogeneratorTestMule/MOs/_ParentMO.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ @implementation ParentMOID
@implementation _ParentMO

+ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ {
return [NSEntityDescription insertNewObjectForEntityForName:@"Parent" inManagedObjectContext:moc_];
NSParameterAssert(moc_);
return [NSEntityDescription insertNewObjectForEntityForName:@"Parent" inManagedObjectContext:moc_];
}

- (ParentMOID*)objectID {
Expand Down

0 comments on commit 7d01950

Please sign in to comment.