cocoa - NSPredicate string matching against NSSet's -


I try to use an NSPredicate to search string matches against an array of coreadata items generated in this way I am:

  // Hold an array of all company projects NSArray * array = [[Company projects] all objects];  

I use the following decision to match a project name, company name or client names with a case-insensitive string (Note: Allow it for partial matches 'App' can be used to match 'apple', etc.):

  (name as [cd]% @) or (any company name [cd]% @) Or (Any companies. Client names like [CD]% @)  

CoreData relation referred to as WordRetch Not like:

  SELF - & gt; (NSString *) Name SELF - & gt; (NSSET *) Companies - & gt; (NSString *) Name SELF - & gt; (NSSET *) Companies - & gt; (NSSE * *) - & gt; Client - & gt; (NSString *) Name  

Whenever I try to filter by the above bills, I find the following in my console:

 < Code> HIToolbox: Exceptions can not be ignored by ragging on objects ("Apple Inc.", "Test Co.", Microsoft)}. 'If I understand things correctly, then it seems In an attempt to match that keyboard against "companies.clience.name" an NSSet (or other objects) I) Returns where an NSString (name) was expected.  

What am I doing?

Companies will withdraw the collection of Clients.name , NSSet s, where each element in cooperation is the content of a companion's client's name (i.e. a < Code> NSSet ). You probably want to use companies. @ UnionOfSets.clients.names in your actual string.

Use in key-value coding See the guide to do.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -