Core data many-to-many relationship - Predicate question
        Posted  
        
            by Garry
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Garry
        
        
        
        Published on 2010-02-24T18:45:10Z
        Indexed on 
            2010/03/30
            6:33 UTC
        
        
        Read the original article
        Hit count: 500
        
In my Core Data model I have two entities: List and Patient. List has an attribute called 'name'.
A List can have any number of Patients and each Patient can belong to any number of different lists. I have therefore set a relationship on List called 'patients' that has an inverse to-many relationship to Patient AND a relationship on Patient called 'lists' that has a to-many relationship to List.
What I'm struggling to figure out is how to create a Predicate that will select all Patients that belong to a particular List name.
How would I go about this? I have never used relationships before in Core Data.
Thanks,
© Stack Overflow or respective owner