【发布时间】:2014-05-04 00:26:50
【问题描述】:
当我对具有复杂类型的非标量属性的实体调用 rejectChanges() 时,它似乎正在删除所有这些复杂类型 -
metadataStore.addEntityType({
shortName: "GrandParent",
namespace: "Product",
dataProperties: {
id: { dataType: "String", isPartOfKey: true },
someValues: { complexTypeName: "parentValue:#Product", isScalar: false }
}
});
metadataStore.addEntityType({
shortName: "ParentValue",
namespace: "Product",
isComplexType: true,
dataProperties: {
id: { dataType: "String" },
text: { dataType: "String" },
previousValue: { complexTypeName: "ChildValue:#Product", isScalar: true }
}
});
metadataStore.addEntityType({
shortName: "ChildValue",
namespace: "Product",
isComplexType: true,
dataProperties: {
value: { dataType: "String" },
text: { dataType: "String" }
}
});
我之前遇到的问题是,将 complexTypes 添加到数组并调用 cancelChanges 会使列表中的 complexTypes 加倍 - 我现在可以重新查询服务器以获取项目,但它似乎有些相关
【问题讨论】:
-
我明天会试着看看这个。
-
@JayTraband 如果你有机会看到这个,请告诉我 - 如果需要,我可能可以在 jsBin 或其他东西中重新创建。
-
对不起,被埋葬了……再创造会很棒;)
标签: knockout.js breeze