I want to retrieve the most recently added record from CoreData. I was wondering if that's possible using NSPredicate? If so, how?
e.g. i have a one-to-many relationship between Department and Staff, and i want to fetch the Staff record that was most recently employed. The Staff table has a date field which can be used.
I don't want to fetch all the Staff records and then look for the right one. Note that CoreData stores the related records in an NSSet.