mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 优化 SqlServer timestamp 行版本的支持;#1412
This commit is contained in:
parent
f96ca81f0f
commit
0c82e810c2
@ -1144,7 +1144,7 @@ namespace FreeSql.Internal.CommonProvider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_versionColumn != null)
|
if (_versionColumn != null && _versionColumn.Attribute.CanUpdate)
|
||||||
{
|
{
|
||||||
var vcname = _commonUtils.QuoteSqlName(_versionColumn.Attribute.Name);
|
var vcname = _commonUtils.QuoteSqlName(_versionColumn.Attribute.Name);
|
||||||
if (_versionColumn.Attribute.MapType == typeof(byte[]))
|
if (_versionColumn.Attribute.MapType == typeof(byte[]))
|
||||||
|
@ -327,7 +327,7 @@ namespace FreeSql.Internal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (colattr.MapType == typeof(string) && colattr.IsVersion == true) colattr.StringLength = 40;
|
if (colattr.MapType == typeof(string) && colattr.IsVersion == true) colattr.StringLength = 40;
|
||||||
if (colattr.MapType == typeof(byte[]) && colattr.IsVersion == true) colattr.StringLength = 16;
|
if (colattr.MapType == typeof(byte[]) && colattr.IsVersion == true) colattr.StringLength = 16; // 8=sqlserver timestamp, 16=GuidToBytes
|
||||||
if (colattr.MapType == typeof(byte[]) && colattr.StringLength != 0)
|
if (colattr.MapType == typeof(byte[]) && colattr.StringLength != 0)
|
||||||
{
|
{
|
||||||
int strlen = colattr.StringLength;
|
int strlen = colattr.StringLength;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user