I'm working on a complex project that involves several different databases being accessed in the program.
If I'm at a breakpoint in XCode and have a reference to an NSManagedObject
, is it possible to backtrack through the hierarchy of objects and identify which sqlite database this NSManagedObject
came from?
Thanks
Found it... the database can be identified from the LLDB command line like this...
po
[[[theNSManagedObject managedObjectContext] persistentStoreCoordinator] persistentStores]
And in many/most/all cases, the persistentStores returns only a single database, and that database will be the one the record came from.