我有一个嵌套的json,如下所示,我想从节点加载我的网格:'feedetails'。我想在模型中使用关联,并通过我的控制器中可访问的商店加载它。需要帮助。
{
"feepanel": {
"totalAnticipatedMarketValue": "2165951.00",
"feeSetupCtg": {
"feeDetails": [
{
"fromRange": 0,
"toRange": 249999,
"dollarFactor": 0,
"standardRate": 2.5,
"standardPrevRate": 0,
"discountRate": 2.5,
"valueFee": 0,
"individualFee": 6250.07,
"itemSupportRate": 1.2,
"itemFloorRate": 0.9,
"totalFee": 6249.98,
"managerFee": 0,
"itemClientRate": 2.97,
"itemAeRate": 2.5,
"itemRetenRate": 0.47
},
{
"fromRange": 250000,
"toRange": 499999,
"dollarFactor": 0,
"standardRate": 2.5,
"standardPrevRate": 0,
"discountRate": 2.5,
"valueFee": 0,
"individualFee": 6250.07,
"itemSupportRate": 1,
"itemFloorRate": 0.75,
"totalFee": 6250,
"managerFee": 0,
"itemClientRate": 2.97,
"itemAeRate": 2.5,
"itemRetenRate": 0.47
}
]
}
}
}
以下是我有关联的模型描述n,但这不起作用。
{name:'feeDetailsOld',mapping:'feeSetupCtg_Old.feeDetails'},
associations : [
{
type : 'hasMany',
model : 'MCT.model.FeeOldTieredModel',
name : 'feeDetailsOld',
associationKey : 'feeDetailsOld'
}
]
以下是控制器中的代码
model.feeDetailsOldStore //这是未定义的