0

在微风.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 列?

4

2 回答 2

1

Not sure where we say it's not recommended; the only issue is that its not terribly portable across databases, SQLServer 'timestamp' columns are not actually time based, ... but they should still work as concurrency columns with breeze. If not, its likely a bug.

For more info: datetime or timestamp

于 2012-12-12T22:02:29.720 回答
0

有一个涉及 SQL Server Timestamp 列的错误,现已在 v 0.76.4 中修复。...谢谢你找到这个,萨沙。

于 2012-12-13T08:16:37.617 回答