Thank you for reporting this bug. We will make it our priority to review this report.
Ext.data.reader.Reader.readAssociated uses wrong model class for associated records
Ext.data.reader.Reader.readAssociated uses wrong model class for associated records
Please look at Ext.data.reader.Reader.readAssociated:
Code:
readAssociated: function(record, data, readOptions) {
var roles = record.associations,
key, role;
for (key in roles) {
if (roles.hasOwnProperty(key)) {
role = roles[key];
// The class for the other role may not have loaded yet
if (role.cls) {
role.read(record, data, this, readOptions );
}
}
}
}
In readOptions there is property model which is set to right role type (in other words onwer of the association type). But left part type is required.
This fix makes associated records be read correctly:Code:
readAssociated: function (record, data, readOptions) {
var roles = record.associations,
key, role;
for (key in roles) {
if (roles.hasOwnProperty(key)) {
role = roles[key];
// The class for the other role may not have loaded yet
if (role.cls) {
role.read(record, data, this, Ext.apply({}, {model: role.type}, readOptions) );
}
}
}
}
Ext.data.reader.Reader.readAssociated uses wrong model class for associated records
Aucun commentaire:
Enregistrer un commentaire