I found it, the method batch Ext.data.Proxyis an object Ext.data.Operationcreated to be sent to the server.
I expanded with a Ext.data.proxy.Ajaxnew method batch, where I simply disabled new Ext.data.Operationfor my own class of operations.
EDIT
Just because you asked Dmitry B. A short story about why I had to implement my own commitRecords method is that I need the βinternalIdβ data fields for the data that match the actual ID field of the database record. I will not go into why it is too confusing for me to express, but here is what I did:
, commitRecords store.sync(), , Ajax, , .
commitRecords , "internalId" .
, , , , , internalId, commitRecords, , .
, "create_time", commitRecords , "create_time" "internalId" .
Ext.data.Operation, :
Ext.define('MyApp.ux.QueryOperation', {
extend: 'Ext.data.Operation',
commitRecords: function (serverRecords) {
var me = this,
mc, index, clientRecords, serverRec, clientRec;
if (!me.actionSkipSyncRe.test(me.action)) {
clientRecords = me.records;
if (clientRecords && clientRecords.length) {
if (clientRecords.length > 1) {
mc = new Ext.util.MixedCollection();
mc.addAll(serverRecords);
Ext.each(clientRecords, function(clientRec) {
serverRec = mc.findBy(function(record) {
var clientId = clientRec.getId(),
clientTime = clientRec.get('date_created').getTime(),
serverTime = record.get('date_created').getTime();
if(clientId && record.getId() === clientId) {
return true;
}
return (clientTime > serverTime - 2 && clientTime < serverTime + 2);
});
me.updateClientRecord(clientRec, serverRec);
});
} else {
clientRec = clientRecords[0];
serverRec = serverRecords[0];
me.updateClientRecord(clientRec, serverRec);
}
if (me.actionCommitRecordsRe.test(me.action)) {
for (index = clientRecords.length; index--; ) {
clientRecords[index].commit();
}
}
}
}
},
});
, , -, Operation. , , batch, , new Ext.data.Operation, new MyApp.ux.QueryOperation ( Operation ). commitRecords, . "proxy.query", , :
Ext.define('MyApp.store.MyStore', {
extend: 'Ext.data.Store',
requires: [
'ST.ux.QueryProxy',
],
title: 'Student',
model: 'MyApp.model.MyModel',
proxy: {
type: 'query',
}
});
( , - , , .)