2013-04-18 61 views
0
我更新我的商店

更新的记录不匹配Store.sync()

Ext.define("ManageShows.model.Show", { 
extend: "Ext.data.Model", 
config: { 
    idProperty: 'id', 
    fields: [ 
     { name: 'id' , type: 'int'}, 
     { name: 'name', type: 'string' } 
    ], 
    validations: [ 
     { type: 'presence', field: 'name', message: 'Please enter a name for this show.'} 
    ] 
} 
}); 

时当我尝试同步()我得到这个错误

[WARN][Ext.data.Operation#process] Unable to match the updated record that came back from the server. 

的列表保存有麻烦

该数据将包含列表中第一个元素的重复条目。但是,如果我刷新页面,我的列表将正确显示更新的术语。

我不知道哪部分记录不匹配。唯一不同的是,我可以看到Store.id =“ext-record-4”似乎是自动生成的,我并没有将这个值保存在我的数据库中,但是Store.data.id = {来自数据库的id}。

我如何找到不匹配的东西?

编辑: 重要的一点是,我得到的错误在连续7次,我有8个条目。如果我更新的第一项,然后修改工作,并在corrently

回答

0

显示我停下我的servlet从同步()调用之后返回JSON数据。这是不需要的,因为sencha touch自动更新本地数据