Re: CoreData and Distinct
Re: CoreData and Distinct
- Subject: Re: CoreData and Distinct
- From: Marc Monguio <email@hidden>
- Date: Thu, 8 Jun 2006 01:13:33 +0200
Is there any way now (7 months later my former post) to send a
DISTINCT or or GROUP BY statments to coredata ?
When 7 months ago I ended up realizing that I wasn't able to find how
to use Distinct in CoreData, I coded it manually in Cocoa: did put
all table values in one array, sort the array by the distinct field
and then take only rows whose field was different from previous one.
No need to say that I would not recommend this approach due to it's
serious performances issues.
regards,
Marc M.
I have 1000 records in my cocoa sqlite DB. Is there any way to do
build an NSPredicate to retrieve an array of nsmanagedobject with a
distinct attribute values from a persistent store?
When trying to do it through bindings using the
"email@hiddenName" it was very
slow (spinning wheel appears) but querying directly the SQLite3 I
get results very fast. Maybe is that bindings don't take advantage
of the 'distinct' in SQLite ?
$ sqlite3 Library.sql "select distinct ZFIRSTNAME from ZPERSON
ORDER BY ZARTISTNAME"
_______________________________________________
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