Reputation: 1536
It may looks like a newbie question, but I really am. I try to fetch only first object from Core data. But I try to figure out how could I done this?
For example, it may have 100 object in Core data for specific entity. I just need the first one. Could you give me your advice?
Upvotes: 1
Views: 398
Reputation: 29333
See Fetch limits
NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease];
[request setFetchLimit:1];
Upvotes: 3