0
votes

I have two related entities in core data

  1. a book entity @property (nonatomic, retain) NSString * author; @property (nonatomic, retain) NSString * name; @property (nonatomic, retain) NSSet *reviews;

  2. a review entity

    @property (nonatomic, retain) NSString * reviewer; @property (nonatomic, retain) NSString * reviewText; @property (nonatomic, retain) Book *book;

the last property in each is the relationship.

I have a book object Book *book

How do I fetch from CoreData all review object that are related to 'book'?

1

1 Answers

1
votes

book.reviews should return a set of review objects for that book.