在 ExtJs 4 中,商店中的新记录在0
同步到服务器之前作为 id 获得。在 ExtJs 6 中, id 'Mb.model.images.Image-1'
。
Ext.define('Mb.model.images.Image', {
extend: 'Ext.data.Model',
fields: [
{name: 'id', type: 'int'},
{name: 'code', type: 'string'},
{name: 'filename', type: 'string'},
{name: 'path', type: 'string'}
]
})
是否有可能在 ExtJs 6 中获得旧行为?
我看了看identifier: 'sequential'
,但这会在客户端分配一个自动递增的 id,这将与服务器端分配的 id 冲突。