I have one-to-one relationship between entity A and entity B (one sided), for example named bRel. I have subclasses of NSAtomicStore
(MyStore) and NSAtomicStoreCacheNode
(MyCacheNode). In the load:
method of MyStore I create instances of MyCacheNode for entities A and B (aNode and bNode) and assign corresponding propertyCache dictionary for each one. The propertyCache for aNode contains bNode for key @"bRel"
.
The aManagedObject is created normally and has all the properties valid. But when aManagedObject accesses the bManagedObject through the aManagedObject.bRel.someAttribute
, the bManagedObject remains fault. bManagedObject doesn't receive awakeFromInsert
or awakeFromFetch
. The bNode and bManagedObject share the same instance of managedObjectID
. The bNode is alive when bManagedObject accesses someAttribute. When aManagedObject accesses its attributes, it goes through the valueForKey:
of MyCacheNode. When bManagedObject does, we don't get there.
bManagedObject just never fires at all.
Can anyone suppose what should I check in this situation?