I got it to work. So what I ended up doing is searching through each array I have for the object and return the matching object (not the persistentObject but the object that is part of my data already). In other words
- (id)outlineView:(NSOutlineView *)outlineView itemForPersistentObject:(id)object {
id persistentObject =[NSKeyedUnarchiver unarchiveObjectWithData:object];
for (Class * a in dataArray) {
if ([a isEqual:persistentObject]) {
return a; //instead of returning persistentObject
}
}
}
This did the trick. I've searched long and wide for this and I hope someone finds it useful.