Core Data Fetched属性 - 基本 [英] Core Data Fetched Properties - Basics

查看:752
本文介绍了Core Data Fetched属性 - 基本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过Core Data Fetched属性,我如何执行这个简单的请求:

With Core Data Fetched Properties, how do I perform this simple request:

我想要Fetched属性( myFetchProp )存储到 StoreA ,它应该:

I want the Fetched Property (myFetchProp) to be on store StoreA, and it should do:

[myFetchProp getMeRecordWithPredicate:@"X == 35" inEntity:@"entityH" fromStore:StoreB];

原谅我的错误语法,但我想我的观点很容易理解。

Forgive my wrong-syntax, but I suppose my point is easy to understand.

我在网上找不到任何简单明了的例子。

I can’t find any simple and clear example on the net. I presume that should not be so difficult.

推荐答案

因为我刚刚读过Marcus S. Zarra的 核心数据:适用于iOS,OS X和iCloud的数据存储和管理 (第2版) (请参阅此处这里)让我引用它在主题:

Since I have just read Marcus S. Zarra's Core Data: Data Storage and Management for iOS, OS X, and iCloud (2nd edition) (see here and here) let me quote it on the topic:


在实践中,我发现抓取的属性不太有用,
比创建存储的抓取请求或者在代码中构建
获取请求。通常当情况需要一个
fetched属性时,它往往更容易子类化实体在
问题,在代码中执行 NSFetchRequest 返回结果。

因此,获取的属性可能很简单的假设可能是错误的。

So the assumption that fetched properties can be simple may be wrong.

这篇关于Core Data Fetched属性 - 基本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆