我以微風Edmunds爲例。微風複雜類型數據屬性顯示無數據
正如您在下面看到的,我在Make實體上添加了一個新的名稱數據屬性作爲複雜類型。複雜類型顯示在初始化函數的底部。
在調用web api並返回結果後,我在make結果上看到新的數據屬性,但沒有這個新名稱的數據。如下所示:
Array[61]
0: proto._setCtor.proto
_backingStore: Object
entityAspect: ctor
id: (...)
modelLinks: (...)
models: (...)
name: "AM General"
**names**: proto._setCtor.proto
_backingStore: Object
complexAspect: ctor
name: ""
__proto__: Object
niceName: (...)
__proto__: Object
1: proto._setCtor.proto
2: proto._setCtor.proto
3: proto._setCtor.proto
4: proto._setCtor.proto
5: proto._setCtor.proto
6: proto._setCtor.proto
7: proto._setCtor.proto
8: proto._setCtor.proto
9: proto._setCtor.proto
10: proto._setCtor.proto
11: proto._setCtor.proto
12: proto._setCtor.proto
13: proto._setCtor.proto
14: proto._setCtor.proto
15: proto._setCtor.proto
16: proto._setCtor.proto
17: proto._setCtor.proto
18: proto._setCtor.proto
19: proto._setCtor.proto
20: proto._setCtor.proto
21: proto._setCtor.proto
22: proto._setCtor.proto
23: proto._setCtor.proto
24: proto._setCtor.proto
25: proto._setCtor.proto
26: proto._setCtor.proto
27: proto._setCtor.proto
28: proto._setCtor.proto
29: proto._setCtor.proto
30: proto._setCtor.proto
31: proto._setCtor.proto
32: proto._setCtor.proto
33: proto._setCtor.proto
34: proto._setCtor.proto
35: proto._setCtor.proto
36: proto._setCtor.proto
37: proto._setCtor.proto
38: proto._setCtor.proto
39: proto._setCtor.proto
40: proto._setCtor.proto
41: proto._setCtor.proto
42: proto._setCtor.proto
43: proto._setCtor.proto
44: proto._setCtor.proto
45: proto._setCtor.proto
46: proto._setCtor.proto
47: proto._setCtor.proto
48: proto._setCtor.proto
49: proto._setCtor.proto
50: proto._setCtor.proto
51: proto._setCtor.proto
52: proto._setCtor.proto
53: proto._setCtor.proto
54: proto._setCtor.proto
55: proto._setCtor.proto
56: proto._setCtor.proto
57: proto._setCtor.proto
58: proto._setCtor.proto
59: proto._setCtor.proto
60: proto._setCtor.proto
length: 61
__proto__: Array[0]
我缺少什麼?
謝謝...
metadataStore.addEntityType({
shortName: "Make",
namespace: "Edmunds",
dataProperties: {
id: { dataType: DT.Int64, isPartOfKey: true },
name: { dataType: DT.String },
names: { dataType: DT.ComplexType, complexTypeName: "Names:#Edmunds", isScalar: true },
niceName: { dataType: DT.String },
modelLinks: { dataType: DT.Undefined }
},
navigationProperties: {
models: {
entityTypeName: "Model:#Edmunds", isScalar: false,
associationName: "Make_Models"
}
}
});
metadataStore.addEntityType({
shortName: "Names",
namespace: "Edmunds",
isComplexType: true,
dataProperties: {
name: { dataType: DT.String, isNullable: false }
}
});
我做了以下更改,影響 – user3853158 2014-09-02 13:03:45
不知道我理解您的評論。 – 2014-09-02 20:01:44