I was creating an entity in my method to get the miles - once I got rid of that the error went away.
The data is still not saving appropriately, but that's another question entirely.
I commented out the part to create the new 'blank' entity and just set the array to nil and handled what to do if that was nil elsewhere in my code.
Here is the method for those curious:
//****GET MILEAGE METHOD****//
- (NSArray *)getMileage {
//Update the Mileage indicator to display miles between currently selected values
NSString *begSchool = [_schoolArray1 objectAtIndex:[_tripPicker selectedRowInComponent:0]];
NSString *endSchool = [_schoolArray1 objectAtIndex:[_tripPicker selectedRowInComponent:1]];
NSPredicate *milesFilter = [NSPredicate predicateWithFormat:@"beg_school=%@ AND end_school=%@", begSchool, endSchool];
NSArray *resultMiles = [MetaMiles MR_findAllWithPredicate:milesFilter];
if (!resultMiles || ![resultMiles count]) {
//The first load - this displays appropriately in log letting us know there is currently nothing there
NSLog(@"Empty Array");
//MetaMiles *emptyInstance = [MetaMiles MR_createEntity];
//resultMiles = [[NSArray alloc]initWithObjects:emptyInstance, nil];
resultMiles = nil;
} else {
MetaMiles *tripMiles = [resultMiles objectAtIndex:0];
//This confirms our result miles come out appropriately - they look like this: ("2.1")
NSLog(@"Our result miles are: %@", tripMiles.miles);
}
return resultMiles;
}
//****END GET MILEAGE****//