¡@

Home 

2014/10/15 ¤U¤È 10:12:17

iphone Programming Glossary: obtainpermanentidsforobjects

Core Data could not fullfil fault for object after obtainPermanantIDs

http://stackoverflow.com/questions/11321717/core-data-could-not-fullfil-fault-for-object-after-obtainpermanantids

the duplicate object disappears so I know it's just an issue with id mapping. So I thought I might try backgroundMOC obtainPermanentIDsForObjects backgroundMOC.registeredObjects.allObjects error nil before saving at all I've tried after saving too . However for some.. you have any hints that might lead me in the right direction please share. Thanks Edit Ok so initially I was calling obtainPermanentIDsForObjects on the backgroundMOC which is a child of the mainMOC which is a child of the masterMOC. I switched it so that I obtain the.. be able to ask for permanent IDs though but you should only ask for them on the objects that have been inserted. moc obtainPermanentIDsForObjects moc.insertedObjects.allObjects error 0 You must do this before saving the MOC though because if you save without obtaining..

Core Data Primary Key

http://stackoverflow.com/questions/901640/core-data-primary-key

Note that this ID is temporary until either the object is saved for the first time or you call NSManagedObjectContext obtainPermanentIDsForObjects error Use the CFUUID family of functions to generate a UUID for each object in your awakeFromInsert method Create your own..