【问题标题】:in CoreData Get Specific Column Data from Table在 CoreData 中从表中获取特定的列数据
【发布时间】:2014-05-16 14:36:19
【问题描述】:

我正在为我的 ios 应用程序使用 Core Data,我想知道如何从实体表中检索整个列?例如,我有兴趣从我的表中获取主键。

【问题讨论】:

标签: ios core-data identity-column


【解决方案1】:

将 Predicate 添加到 NSFetchRequest ,在 predicate 中传递您的条件。

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"coloumn_no = 10"];

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-04
    • 1970-01-01
    • 2018-03-25
    • 2022-12-07
    相关资源
    最近更新 更多