与仅更新产品的核心关系 [英] addrelationship to only updated products Core data

查看:52
本文介绍了与仅更新产品的核心关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在上下文中大约有1个lac产品,但是当我与服务器同步时,只有10-15个产品是更新的,因此我还必须更新该产品与其他型号的关系。

I have around 1 lac products in the context, but when I synchronise to server only 10-15 product is update so I have to update the relationship of the product also with other models.

有什么方法可以使我仅从Core数据文件或上下文中获取更新的产品。
重新建立1个lac产品的所有关系非常耗时。

So is there any method that I can get the updated products only from the Core data file or the context. Its very time consuming to make all relationship again of 1 lac products.

我检查了InsertedObject属性,但在保存上下文后给了我0。

I checked InsertedObject property but it give me 0 after saving context.

推荐答案

您没有给我们提供很多细节。您要从服务器中获取10-15个产品并将其解析为Core Data?

You are not giving us much detail to work with. You are getting 10-15 products from the server and are parsing them into Core Data?

如果您正在执行此操作,则应该在解析过程中做任何关系映射。在解析期间,您拥有了所需的所有信息,因此这是进行任何其他维护或映射的适当时间。

If that is what you are doing then it is during the parse that you should be doing any relationship mapping. You have all the information you need during the parse so that is the proper time to be doing any other maintenance or mapping.

如果这不是问题,请更新您的问题

If that is not the issue then update your question with more detail.

这篇关于与仅更新产品的核心关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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