PDA

View Full Version : hasMany with different source request not nested data



dj-death
18 Aug 2012, 7:14 PM
Hy everyone thanx in advance for who see my lines. i'm fetching data from 2 different sources, i use the ajax proxy with 2 json files in dev environnement, but i fail to get daughters models from the mother model,
i actually give a store for every model with ajax proxy..but i want from my controller in my MVC app to load the associated data from the current user.

the mother class

fields: [
{name: "name", type: "string"},
{name: "progress", type: "int", convert: null},

{name: "semestre_id", type: "int"},
],

hasMany: {
model: "SMgr.model.Element",
foreignKey: "module_id",
associationKey: "elements",
name: "elements",

},


the daughter

fields: [
{name: "name", type: "string"},
{name: "progress", type: "int", convert: null},

{name: "module_id", type: "int"}

],