Core Data: Get Managed Object by unique part of the objectID
Get the Person object whose objectID ends with unique number 317. The whole ID is:
<x-coredata://A3EDF6C1-229D-4658-A04E-598ADF1C749A/Person/p317>
or I need to get Department object, which ends with 5; again full ID is:
<x-coredata://A3EDF6C1-229D-4658-A04E-598ADF1C749A/Department/p5>
These numbers are actually primary keys in the SQLite database's tables and I can see them if I open the database directly with sqlite3, and I can of course select the records using SQL query;
*but I can not figure out how to get these objects using CoreData. I guess I should create the NSPredicate for the fetch request; but I don't know how to write the predicate which will give me the exact object based on the unique part of the objectID*
As I understand, objectIDs are not object's "normal" attributes.
Please help. Thanks in advance.
MacBook, iMac, iPhone, Mac OS X (10.6.4)