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 with my data.
Is there any way to stop this behavior or to solve this issue?
I have read idProperty Sencha Docs but I am not able to solve my issue. Kindly Help.
I ran into same problem and using ajokn answer I did this.
Ext.define('ThemeApp.model.peopleModel', {
extend: 'Ext.data.Model',
fields: [
{name: 'id', type: 'int', persist: false},
{name: 'xyz', type: 'auto'}
]
}
I didn't set the idProperty : 'login' cause its default value is 'id', so simply set persist: false for id property in your model.