【发布时间】:2015-10-30 19:14:35
【问题描述】:
当我运行以下代码时 -
this.entity.entityAspect.entityManager.createEntity('TblReceipt', {
ReceiptNo : 123
....
});
代码第一次运行良好并创建了新实体。现在,当用户尝试再次运行它时,会出现以下错误 -
Uncaught Error: A MergeStrategy of 'Disallowed' does not allow you to attach an entity when an entity with the same key is already attached"
上述错误显示在控制台中。如何在 javascript 代码中捕获此错误并向用户显示消息?
谢谢
【问题讨论】:
标签: breeze