I have to fetch all books having tags that selected book has.
BOOK <<-->> TAGS
A book can have multiple tags. If suppose i select a book and that has tags "database, algorithms". Then it should select all books that has tags "database", "algorithms", and both "database, algorithms".
My Predicate to fetch from core data is :
request.predicate = [NSPredicate predicateWithFormat:@"(ANY %K IN %@)",
REL_BOOK_TAG_LIST, tagList];
where tagList is of selected book's tagList (of type NSSet
). I also tried using NSArray
but didn't work.
I am going in correct direction of should have to do something differnt?
Please help me. Thanks.