简体   繁体   English

当管理对象模型更新时,其关系模型不会更新

[英]When a managed object model updates its relationship model is not getting updated

I have a feed model which is having one-many relationship with user model. 我有一个供稿模型,它与用户模型有很多关系。 When I am updating a parameter on user model on mainQueueContext, my feed model is pointing to that old user model. 当我在mainQueueContext上的用户模型上更新参数时,我的提要模型指向该旧用户模型。

Can someone help me where could be the problem? 有人可以帮我解决问题吗?

The issue issue is with both are in different context. 问题在于两者都处于不同的环境中。 When we use parent and child context we should make sure to save parent context also. 使用父级和子级上下文时,还应确保也保存父级上下文。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM