Core data 核心数据:托管类找不到其属性

Core data 核心数据:托管类找不到其属性,core-data,nsmanagedobject,Core Data,Nsmanagedobject,嗨 我有一个有点奇怪的问题 我使用两个相互关联1到1的托管类。 一个名为CharInfo,另一个名为ItemInfo CharInfo.h @property (nonatomic, retain) ItemInfo * slotEar; CharInfo.m @dynamic slotEar; 当我尝试如下设置属性时: charInfo.slotEar = curentChar.slotEar; 程序是否崩溃: -[CharInfo setSlotEar:]: unrecognized s

我有一个有点奇怪的问题

我使用两个相互关联1到1的托管类。 一个名为CharInfo,另一个名为ItemInfo

CharInfo.h
@property (nonatomic, retain) ItemInfo * slotEar;
CharInfo.m
@dynamic slotEar;
当我尝试如下设置属性时:

charInfo.slotEar = curentChar.slotEar;
程序是否崩溃:

-[CharInfo setSlotEar:]: unrecognized selector sent to instance 0x68d4d60
当然,我的对象charInfo是否有可以保存引用的属性

curentChar.m
@property (nonatomic, retain) ItemInfo *slotEar;
curentChar.h
@synthesize slotEar;
引用是有效的,因为应用程序可以使用引用和ItemInfo来计算内容

技术上我觉得还可以。一切正常,这意味着我可以创建CharInfo,设置所有属性,甚至其他关系,比如CharDetail,但不能引用ItemInfo

CharInfo.h
@property (nonatomic, retain) ItemInfo * slotEar;
CharInfo.m
@dynamic slotEar;

知道这里可能有什么问题吗?

在核心数据设计器中检查您的托管对象模型,并检查您是否真的将一对一关系添加到了名为
slotreal
ItemInfo
中,这是版本控制的问题。应用程序不使用版本控制,但XTCDATA模型实际上是XTCDATA模型