【发布时间】:2013-05-10 15:54:39
【问题描述】:
我是 Core Data 的新手
我有 2 个实体 Routine 和 Exercise,它们与 Routine.exercise 和 Exercise.routine 相关。
用户例程有名称,用户练习也有名称。
我试过了
并且还尝试了 jsut Routine.exercise = Exercise 但这给了我一个警告说 Comparision of distinct pointer type (NSSET and Exercise) 我也尝试做 Routine.exercise.name = @"theName" 但我正在推动它,因为我无法获得这样的运动名称......
if (Routine.exercise == Exercise.routine) {
NSLOG(@"YES");
} else {
NSLOG(@"NO");
}
基本上我只想知道运动是否与常规建立了关系。有人可以帮我解决这个问题吗?
是多对多关系
【问题讨论】:
-
A.userB 是一对多关系吗?如果是这样,那将解释警告,因为它们存储为 NSSet。
-
是多对多关系
标签: ios xcode cocoa-touch core-data