I have 2 NSManagedObjects with a relationship of one to many. Object A has many Object Bs. Object B has a created date. I want to be able to sort all the Object As by the latest Object B created date. Is this possible through the NSSortDescriptor?

@dadixon Thanks very much for your question!

First off, my apologies for the delayed response.

From what I know, you would need to execute your fetch first, and then sort the resulting array using:


Your sort criteria would be something like: (ObjectB.date), ascending: true

Here is a link to the Apple documentation with more info.

I hope this helps!

All the best.