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) );
}
}
}
}