• 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
Re: predicate for a Core Data fetch request rejected by SQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: predicate for a Core Data fetch request rejected by SQL


  • Subject: Re: predicate for a Core Data fetch request rejected by SQL
  • From: Joanna Carter <email@hidden>
  • Date: Fri, 5 Mar 2010 22:18:47 +0000

Hi Mark

> So, here is my plea for help.  I have a predicate of the form: "<character string> BEGINSWITH path".  In other words, I am searching entities that possess a (string) property "path" to look for one whose path is a prefix of some string (which is inserted into the predicate via the fetch-request-template variable substitution).  This fetch executes just fine on an XML store.  The same fetch on an SQL store yields:  unimplemented SQL generation for predicate ("/Volumes/MacHD/Applications/Utilities" BEGINSWITH path).

You need to think about how a predicate would work against a SQL store. The left-hand side of the expression cannot be anything other than the name of a column or a path to the name of a column.

Have you thought of using either "path LIKE ..." with wildcards, or "path MATCHES ..." with a regex expression?

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Predicates/Articles/pSyntax.html#//apple_ref/doc/uid/TP40001795 is the page that discusses these ideas, look for the String Comparisons section.

Joanna

--
Joanna Carter
Carter Consulting

_______________________________________________

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: predicate for a Core Data fetch request rejected by SQL
      • From: "Sean McBride" <email@hidden>
References: 
 >predicate for a Core Data fetch request rejected by SQL (From: Mark Sanvitale <email@hidden>)

  • Prev by Date: predicate for a Core Data fetch request rejected by SQL
  • Next by Date: [NSTableview] can't make selected text stay black
  • Previous by thread: predicate for a Core Data fetch request rejected by SQL
  • Next by thread: Re: predicate for a Core Data fetch request rejected by SQL
  • Index(es):
    • Date
    • Thread