How to create an NSFetchRequest which filters Core Data objects based on attributes AND relationships?

You can traverse relationships in an NSPredicate For example, you could write something like NSPredicate predicateWithFormat:@"title == %@ AND blockbuster. Name LIKE \"Blockbuster C\"", @"Transformers 2" Now, if you don't have a property to compare against and you need to check actual objects, then you could use something like NSPredicate predicateWithFormat:@"title == %@ AND blockbuster IN %@", @"Transformers 2", setOfBlockbusters The full syntax is documented here But setOfBlockbusters could be a set, an array, or a dictionary (if it's a dictionary, the values, not the keys, are used).

You can traverse relationships in an NSPredicate. For example, you could write something like NSPredicate predicateWithFormat:@"title == %@ AND blockbuster. Name LIKE \"Blockbuster C\"", @"Transformers 2" Now, if you don't have a property to compare against and you need to check actual objects, then you could use something like NSPredicate predicateWithFormat:@"title == %@ AND blockbuster IN %@", @"Transformers 2", setOfBlockbusters The full syntax is documented here.

But setOfBlockbusters could be a set, an array, or a dictionary (if it's a dictionary, the values, not the keys, are used).

Thanks so much, that did it! And thanks for the link to the docs. Very helpful.

:) – Dave Gallagher Oct 6 '09 at 22:26.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions