Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

George Buckingham
1,216 PointsiOS help: NSFetchedResultsController
Hi everyone :-)
I'm designing an app using Core Data, and have the following data model:
- Activity <<-----> Goal (as in, a Goal has many Activities, an Activity has only one Goal)
I'm good with saving data in this relationship. However, I need help getting the data back. I'm using a UITableViewController and NSFetchedResultsController, and have access to an object Goal, with a property named activities.
My question: how can I use a NSFetchedResultsController with a one-to-many relationship in this way?
Hopefully you can make sense of the questions!
Cheers, George
1 Answer

George Buckingham
1,216 PointsAfter many hours on StackOverflow, I have an answer.
Use an NSPredicate as part of your NSFetchedResultsController!