Hello to everyone,
I cannot understanding why values assign to array objects become "disordered" after executing executeFetchRequest. Well, I'm not certain that fetching is the problem here. Here's the code.
objects=[NSArray arrayWithObjects:@"a",@"b",@"c",@"d",@"e",nil];
NSManagedObject *DB = nil;
for (int i=0;i<[objects count];i++){
DB = [NSEntityDescription
insertNewObjectForEntityForName:@"dbTable"
inManagedObjectContext:context];
[DB setValue:[objects objectAtIndex:i] forKey:@"item"];
[DB setValue:[NSString stringWithFormat:@"%3.2f", 0] forKey:@"value"];
}
objects = [context executeFetchRequest:request error:&error];
Printings
new wrong ordering after fetch execution into array objects
index 0 :: Item: d
index 1 :: Item: c
index 2 :: Item: e
index 3 :: Item: b
index 4 :: Item: a
thank you.