• 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
Core Data Fetching Limitations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data Fetching Limitations?


  • Subject: Core Data Fetching Limitations?
  • From: Ulai Beekam <email@hidden>
  • Date: Mon, 22 Jun 2009 00:53:54 +0000
  • Importance: Normal

Draw up the following model on a piece of paper:
We have three entities: Department, Employee, and EmployeeCar. Each of them has the 'name' attribute.
Department has the to-many 'employees' relationship to Employee. Its inverse is, naturally, the to-one 'department' relationship in Employee.
Employee has a to-one 'employeeCar' relationship to EmployeeCar. Its inverse is the to-many 'employees' relationship  in EmployeeCar. This reflects the reality that a single car can be assigned to more than one employee, but a given employee does only have one car assigned to him.

NOW HERE IS THE QUESTION: How can I make Core Data: **** fetch all departments that have an employee whose name starts with 'Jo' and whose assigned car has the name of 'Volvo' ****

Can Core Data even make such fetches? Can it be done without ALL,ANY? I ask because I might want to combine many such conditions, making it impossible to do with the SQLite storage option. Maybe I can just simply forget the SQLite storage for this? What are the alternatives? Am I doomed to work with the other slower storages?
And note that I do indeed have to have it inside a single predicate because I have an NSArrayController of Department objects, and after having made the correct predicate (for which I need your help) I plan to set the array controller's fetch predicate to that predicate.
_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/products/events.aspx_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Core Data capabilities questions
  • Next by Date: Re: Core Data capabilities questions
  • Previous by thread: Re: Any Cocoa Developers on this list in Tallinn, Estonia?
  • Next by thread: Core Data Fetching Limitations?
  • Index(es):
    • Date
    • Thread