在微风.debug.js 中:
function updateConcurrencyProperty(entity, property) {
...
else if (property.datatype === DataType.Binary) {
// best guess - that this is a timestamp column and is computed on the server during save
// - so no need to set it here.
return;
} else {
// this just leaves DataTypes of Boolean, String and Byte - none of which should be the
// type for a concurrency column.
// NOTE: thought about just returning here but would rather be safe for now.
throw new Error("Unable to update the value of concurrency property before saving: " + property.name);
}
我的模型上有时间戳。为什么不建议这样做?ASP.Net 上的 EF 教程使用时间戳。您会推荐什么作为 Concurrencycheck 列?