1
我們已經創建了一個complextype(Carrier字段)對象的數組。請參見下面的元數據如何將一個複雜類型對象動態添加到數組中
{ shortName : 'Person',
namespace : 'Demo',
autoGeneratedKeyType : breeze.AutoGeneratedKeyType.Identity,
"dataProperties": [
{
"name": "carriers",
"complexTypeName":"Carrier:#Test",
"isScalar":false
}]
}
開利實體的定義如下:
{
"shortName": "Carrier",
"namespace": "Test",
"isComplexType": true,
"dataProperties": [
{
"name": "Testing",
"isScalar":true,
"dataType": "String"
}
]
}
我們已經爲上述實體下列匹配數據:
{
carriers: [
{
Testing : 'InputBox1'
},
{
Testing : 'InputBox2'
}
]
}
我們正試圖動態添加通過使用以下方法將複合類型對象(Carrier)傳送到上述載流子陣列:
var test = {
"Testing" : "Test"
};
var result = manager.createEntity('Carrier', test);
上面的代碼拋出異常(未定義不是函數)在行號12457內部breeze.debug.js(見下面的代碼)
entity = entityType.createEntity(initialValues);
的拋出異常,因爲的complexType實體不具有'createEntity'功能。
我們在這裏失蹤了什麼?
這樣做了!非常感謝你! – Gopin 2014-10-29 18:25:31