JainAnk
JainAnk

Reputation: 204

how to write sqlite query using coredata

Please help me,

I want to write query(mentioned below) using coredata.

select primKey, ( primKey - 5 ) as **d** from TABLE Order by **d** limit 1.

Upvotes: 1

Views: 1241

Answers (1)

hooleyhoop
hooleyhoop

Reputation: 9198

You cannot - CoreData is not an ORM or a Database and doesn't claim to be. it MAY be backed by SQL lite (or it might not) but that is an implementation detail.

see some of the other times this has come up and here

You will need to use an NSPredicate for your fetch

Upvotes: 2

Related Questions