• 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, SQL stores, and predicate restrictions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data, SQL stores, and predicate restrictions


  • Subject: Core Data, SQL stores, and predicate restrictions
  • From: "Sean McBride" <email@hidden>
  • Date: Fri, 16 May 2008 17:50:02 -0400
  • Organization: Rogue Research

Hi all,

After reading the docs and archives, it is clear to me now that with
Core Data's SQL store one is more limited in the types of predicates one
can use with fetches.

What I can't find is a list of what I can and can't do.  The best I
found was "[the] SQL store, on the other hand, compiles the predicate
[...] to SQL and evaluates the result in the database itself. [...] it
means that evaluation happens in a non-Cocoa environment, and so sort
descriptors (or predicates) that rely on Cocoa cannot work".  How do I
know if my predicate "relies on Cocoa"?

For example, given the Employees/Departments scenario: if I try to fetch
all employees that are in exactly 2 departments I use a fetch predicate
of "departments[SIZE] == 2" which works great everywhere except with the
SQL store.  I learnt this the hard way.

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

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

  • Follow-Ups:
    • Re: Core Data, SQL stores, and predicate restrictions
      • From: Bill Dudney <email@hidden>
  • Prev by Date: Re: The challenge for Cocoa's on-line documentation
  • Next by Date: Re: Dynamic message typing problem
  • Previous by thread: Re: Working through a problem...
  • Next by thread: Re: Core Data, SQL stores, and predicate restrictions
  • Index(es):
    • Date
    • Thread