在breeze.debug.js:ConcurrencyCheck /數據類型
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列?
另外,在上述的註釋: (//這只是葉布爾,字符串和字節的數據類型 - 沒有這應該是 //類型併發列) –
時間戳是DataTime.Binary的。 (不是字節)。 –
我和傑伊在一起。時間戳很好,但DateTime不夠精細,不足以成爲併發列。 Int和Double也是不錯的選擇。 – Ward