Skip to content

Commit

Permalink
xxxx
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksiivinogradov committed Mar 5, 2012
1 parent f175916 commit be37c12
Show file tree
Hide file tree
Showing 6 changed files with 280 additions and 303 deletions.
4 changes: 2 additions & 2 deletions ClassesForAllPlatforms/ClientController.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ - (id)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)coordin

moc = [[NSManagedObjectContext alloc] init];
[moc setUndoManager:nil];
[moc setStalenessInterval:0.0000001213];
//[moc setStalenessInterval:0.0000001213];
// [moc setMergePolicy:NSOverwriteMergePolicy];
[moc setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy];

Expand Down Expand Up @@ -170,7 +170,7 @@ -(void) finalSave:(NSManagedObjectContext *)mocForSave;
NSLog(@" %@", [error userInfo]);
}
[self logError:error];
}
} //else [mocForSave reset];
}

return;
Expand Down
20 changes: 10 additions & 10 deletions Model/InvoicesAndPayments.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ - (void)awakeFromInsert {
[self didChangeValueForKey:@"modificationDate"];
}

-(void)willSave {
NSDate *now = [NSDate date];
if ([self isUpdated]) {


if (self.modificationDate == nil || [now timeIntervalSinceDate:self.modificationDate] > 1.0) {
self.modificationDate = now;
}
}
}
//-(void)willSave {
// NSDate *now = [NSDate date];
// if ([self isUpdated]) {
//
//
// if (self.modificationDate == nil || [now timeIntervalSinceDate:self.modificationDate] > 1.0) {
// self.modificationDate = now;
// }
// }
//}

@end
2 changes: 1 addition & 1 deletion snow/DataControllers/DestinationsClassController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2232,7 +2232,7 @@ - (BOOL)safeSave;
}
[self logError:error];
success = NO;
}
} else [self.moc reset];
}
return success;
}
Expand Down
Loading

0 comments on commit be37c12

Please sign in to comment.