mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 02:14:53 +08:00
MySql CodeFirst default guid 36
This commit is contained in:
@@ -18,6 +18,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (item.IsIgnore)
|
if (item.IsIgnore)
|
||||||
continue;
|
continue;
|
||||||
|
if (item.PropertyInfo!=null&&UtilMethods.GetUnderType(item.PropertyInfo.PropertyType) == UtilConstants.GuidType && item.Length == 0&&item.DataType==null)
|
||||||
|
{
|
||||||
|
item.Length = Guid.NewGuid().ToString().Length;
|
||||||
|
}
|
||||||
DbColumnInfo dbColumnInfo = this.EntityColumnToDbColumn(entityInfo, tableName, item);
|
DbColumnInfo dbColumnInfo = this.EntityColumnToDbColumn(entityInfo, tableName, item);
|
||||||
columns.Add(dbColumnInfo);
|
columns.Add(dbColumnInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user