I’ve tried a lot of combinations, but it seems the client doesn’t allow the reference over reference. If I mimic your setup (I think):
The best I can come up with (that works, but isn’t a real single mx.data.get call) is:
mx.data.get({
xpath: "//Test.EntityA",
count: true,
filter: {
offset: 0,
limit: 20,
sort: [],
references: {
"Test.EntityA_EntityB": {}
}
},
callback: function(EntityAList){
console.log("Retrieved "+EntityAList.length+" object(s)");
for(var i=0;i<EntityAList.length;i++){
var EntityAChildren = EntityAList[i].getChildren("Test.EntityA_EntityB");
console.log("Retrieving children of EntityA");
console.log(EntityAChildren);
for(var j=0;j<EntityAChildren.length;j++){
console.log("EntityAChildren[j] GUID: " + EntityAChildren[j]);
mx.data.get({
xpath: "//Test.EntityB[id="+EntityAChildren[j]+"]",
count: true,
filter: {
offset: 0,
limit: 20,
sort: [],
references: {
"Test.EntityB_EntityC": {}
}
},
callback: function(EntityBList){
console.log("Contents of EntityBList");
console.log(EntityBList);
for(k=0;k<EntityBList.length;k++){
var EntityBChildren = EntityBList[k].getChildren("Test.EntityB_EntityC");
console.log("Retrieving children of EntityB");
console.log(EntityBChildren);
}
}
});
}
}
}
})
but you’d expect to be able to call the reference like:
mx.data.get({
xpath: "//Test.EntityA",
count: true,
filter: {
offset: 0,
limit: 20,
sort: [],
references: {
"Test.EntityA_EntityB": {},
"Test.EntityA_EntityB/Test.EntityB/Test.EntityB_EntityC": {}
}
},
callback: ....
Maybe it’s worth a try to make a support ticket out of it and either ask them to