• 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: NSPredicate with CoreData SQL store behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPredicate with CoreData SQL store behavior


  • Subject: Re: NSPredicate with CoreData SQL store behavior
  • From: Jesse Grosjean <email@hidden>
  • Date: Wed, 15 Mar 2006 12:31:19 -0500

I'm pretty sure that a fetch should return ALL objects matching the predicate, saved or not. I think it was explained at WWDC. IIRC they even said that non saved objects are returned in the fetch result, but that this slow down the fetch a bit. They said that saved objects are faster to obtain...

I'm pretty sure that there is no difference between an NSPersistentDocument and a normal CD stack...
I suppose there is a bug in your code... but it may even be in Apple's code. AFAIK, i never encounter this problem!

Thanks for your response. I'll see if I can reproduce this with an example to show you something more concrete... or better yet to find my bug!


My second question is what is the best way to do a "contains" search on strings in the SQL store? I had been using seaches like "myStringAttribute like[cd] '*searchstring*'", but I just found out that that type of search seems to completely break (no results) if myStringAttribute contains any newLine characters (return key). Is that expected behavior? And if so what is the best way to find if a string attribute (that might have new lines) contains another string?

"CONTAINS[cd]" ?

I wasn't sure that contains was recommended because in the Xcode predicate builder the 'contains' popup button maps to 'like *searchstring*'. Plus I've had some trouble using contains in my own app, but I guess it could be a bug. I'll try to add some code to text CONTAINS in my test program.


I hope your right on both accounts, it should would make some things easier in my program if I could get these working.

Jesse

_______________________________________________
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


References: 
 >NSPredicate with CoreData SQL store behavior (From: Jesse Grosjean <email@hidden>)
 >Re: NSPredicate with CoreData SQL store behavior (From: AurĂ©lien HugelĂ© <email@hidden>)

  • Prev by Date: Re: NSPredicate with CoreData SQL store behavior
  • Next by Date: Re: slow QTKit framegrabbing
  • Previous by thread: Re: NSPredicate with CoreData SQL store behavior
  • Next by thread: Re: NSPredicate with CoreData SQL store behavior
  • Index(es):
    • Date
    • Thread