• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Many-To-Many Predicates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Many-To-Many Predicates


  • Subject: Many-To-Many Predicates
  • From: Todd Freese <email@hidden>
  • Date: Wed, 25 Oct 2006 19:17:51 -0500

I am having trouble creating a predicate that works across multiple relationships. There are two entities that are Many-To-Many to each other through a third "link" entity. Basically an entity of Clips and Albums. A single Clip can be in multiple Albums, likewise, an Album has multiple Clips. I need the third
"link" entity because I need to maintain the sort order in each of the albums. The sort is user defined and would be different for each album.


Here is a link to a screen grab of the model. http:// www.filmworkers.com/model.jpg

I need to filter a NSTableView of Clips based on the selected Album. Here is my predicate that I am sending to the NSTableView.

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY sourceListLinks.sourceListItems.itemName == %@", sourceListItemName];

It seems the search gets through to the SourceListLink entity and stops.

Any ideas on what I am missing?

Todd Freese




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Many-To-Many Predicates
      • From: Frédéric Testuz <email@hidden>
  • Prev by Date: Re: Init Problem
  • Next by Date: Re: Keys down while dragging
  • Previous by thread: Re: Init Problem
  • Next by thread: Re: Many-To-Many Predicates
  • Index(es):
    • Date
    • Thread