Is there any way to disable “idProperty” of Model in Extjs?

后端 未结 3 1269
渐次进展
渐次进展 2021-01-23 16:53

I have a simple Model/proxy. When I create a object of model to send to server via REST, ExtJs is generating Id and putting its value in my \"id\" field and that is conflicting

3条回答
  •  执念已碎
    2021-01-23 17:40

    Set the idProperty to a non existing field. Its dirty I know, but this should do it.

    Ext.define('User', {
        extend: 'Ext.data.Model',
        idProperty : 'foo'
    });
    

提交回复
热议问题