Re: predicate for a Core Data fetch request rejected by SQL
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