Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code first 模式生成的枚举 在数据库中会存在空格 #1737

Open
llyone opened this issue Feb 26, 2024 · 1 comment
Open

code first 模式生成的枚举 在数据库中会存在空格 #1737

llyone opened this issue Feb 26, 2024 · 1 comment

Comments

@llyone
Copy link

llyone commented Feb 26, 2024

问题描述及重现代码:

freesql包版本:3.2.811
数据库:mysql 5.7.25-log
打开同步表结构之后,每次生成的枚举值都会有一两个值的前面生成一个空格,但是不是每一个枚举值前面都有空格,升级包版本为3.2.812之后,打开表结构同步,查询数据时直接报 Data truncated for column 'xxx' at row 4,并且是在调用tosql方法时就报错,还没有进入到查询数据阶段,关闭同步表结构之后查询数据正常.

//枚举值
public enum DataType
{
    BYTE,
    BOOL,
    DWORD,
    WORD,
    INT,
    DINT,
    CHAR,
    REAL
}

//属性
 [Column(Order = 7)]
 [Required]
 public MyDataType DataType { get; set; }



// c# code

1708914271207

数据库版本

mysql 5.7.25-log

安装的Nuget包

3.2.811

.net framework/. net core? 及具体版本

net8.0

@2881099
Copy link
Collaborator

2881099 commented Feb 27, 2024

v3.2.813

2881099 added a commit that referenced this issue Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants