mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 优化 枚举属性的默认值容错,枚举下标不存在 0 的时候,mysql 迁移结构默认值报错;
This commit is contained in:
@ -408,10 +408,18 @@ namespace FreeSql.Tests
|
||||
public Guid? Id { get; set; }
|
||||
public string xxx { get; set; }
|
||||
}
|
||||
public class TestAddEnum
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public TestAddEnumType Type { get; set; }
|
||||
}
|
||||
public enum TestAddEnumType { 中国人, 日本人 }
|
||||
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
g.mysql.Select<TestAddEnum>().ToList();
|
||||
|
||||
g.sqlite.Insert(new TestGuidId { xxx = "111" }).ExecuteAffrows();
|
||||
g.sqlite.Insert(new TestGuidId { xxx = "222" }).ExecuteAffrows();
|
||||
var gkkdk1 = g.sqlite.Select<TestGuidId>().Where(a => true).ToList();
|
||||
|
Reference in New Issue
Block a user