• 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: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness


  • Subject: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • From: "Melissa J. Turner" <email@hidden>
  • Date: Wed, 22 Apr 2009 14:34:32 -0700


On Apr 22, 2009, at 02:12, Mike Abdullah wrote:


On 22 Apr 2009, at 08:48, Ben Trumbull wrote:

Of course, why Apple couldn't have then added automatic support
for in-memory matching as the second step I don't know

Probably because nobody ever cared enough to file an enhancement request, and it didn't occur to us that writing 1 line of code to call filteredArrayWithPredicate was so troublesome.

Calling -filteredArrayWithPredicate is no hassle, but for a large predicate, it has the bad performance of comparing a bunch of the persistent properties all over again, despite already knowing they'll match the predicate. Since I assume Core Data must do some kind of internal splitting up of the predicate in order to perform its fetch, I'd have thought it is in a good position to know what the remaining transient portion of the predicate is.

You assume incorrectly.

CoreData simply translates the predicate to SQL and passes it down to SQLite as a WHERE clause. Hence the lack of support for transient properties: SQLite has no idea what to do when you ask it to qualify by a column that doesn't exist in its schema.

+Melissa

_______________________________________________

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 Fetches + Transient Properties + NSPredicateEditor = Sadness
      • From: Mike Abdullah <email@hidden>
References: 
 >Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness (From: Ben Trumbull <email@hidden>)
 >Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness (From: Mike Abdullah <email@hidden>)

  • Prev by Date: NSOpenPanel listing .app's and Mac OS X executables
  • Next by Date: Re: -[NSSharedWorkspace openFile:]: Application exits with status 255
  • Previous by thread: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • Next by thread: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • Index(es):
    • Date
    • Thread