如何刷新实体使用ember数据 [英] How to refresh entity using ember data
问题描述
如何强制emberdata更新已加载的记录?
如何强制emberdata从服务器得知某些记录已经被删除?
我唯一的方法可以找到实现这样的东西是手动触发 App.store.loadMany(data)
与json(如果你有),或执行 App.store.findQuery(App.Model,{})
,这将使您的缓存无效。
我几天开了一个问题以前在ember上询问一下:
https://github.com/emberjs/data/issues/245
似乎他们正在处理这种情况 - ember / data是还是很年轻!
In my aplication I recived with websockects info about with objects are changed and ember data should reload them.
How can I force emberdata to update already loaded record? How can I force emberdata to get know from server that some records are already delted?
The only way I could find to achieve something like this is to trigger manually App.store.loadMany(data)
with the json (if you have it), or performing a App.store.findQuery(App.Model, {})
, which will invalidate your cache.
I opened an issue a few days ago on ember to ask about this:
https://github.com/emberjs/data/issues/245
It seems like they're working on this case scenarios - ember/data is still quite young!
这篇关于如何刷新实体使用ember数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!