Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Breeze 并发检查/数据类型_Breeze - Fatal编程技术网

Breeze 并发检查/数据类型

Breeze 并发检查/数据类型,breeze,Breeze,在breeze.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 // -

在breeze.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列

不确定我们在哪里说不推荐;唯一的问题是它在数据库中的可移植性不是很好,SQLServer的“timestamp”列实际上不是基于时间的。。。但它们仍然应该作为breeze的并发列工作。如果不是,它很可能是一个bug


有关详细信息:

有一个涉及SQL Server时间戳列的错误,该错误现已在V0.76.4中修复。。。感谢您找到这一点,Sascha。

在上面的评论中:(//这只留下Boolean、String和Byte的数据类型-其中没有一个应该是并发列的//类型。)时间戳是DataTime.Binary。(不是byte)。我同意Jay的观点。时间戳很好,但DateTime不够精细,无法成为并发列。Int和Double也是不错的选择。