我有以下核心数据实体:
Event, User, SpecialUser
,SpecialUser
是 的子类,User
与Event.owner
User
我遇到了我想说的情况
event.owner = specialUser
,但这会引发错误
'NSInvalidArgumentException', reason: 'Unacceptable type of value for to-one relationship: property = "owner"; desired type = User; given type = SpecialUser;
我也尝试在分配期间进行投射,例如event.owner = (User *) specialUser
,无济于事。