Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 js-data 存储中有一个来自我的 API 的用户,我更改了它的名称。我还没有保存记录。
为什么不ds.unsaved('user')返回一个空数组?
ds.unsaved('user')
该unsaved()函数仅返回没有 id 的记录。不管他们有没有变化。
unsaved()
根据文档
返回此集合中的所有“未保存”(不是唯一可识别的)记录。