瀚高数据库 DecimalDigits 识别失败 返回

SqlSugar 待处理
2 159

瀚高数据库 DecimalDigits 识别问题:

[SugarColumn(IsNullable = true, Length = 8, DecimalDigits = 2)]
public decimal CalcUnit { set; get; }

转成SQL:
"calcunit" float8(8) DEFAULT NULL  ,

导致建表失败。

热忱回答2

  • 我翻看了代码的历史记录,发现以前版本的SqlSugar是可以正确执行的,现在使用版本  5.1.4.211 出现以下问题:
     image.png

    0 回复
  •  [SugarColumn(IsNullable = true, DefaultValue = "0")] 
     public string DisplayNotice { set; get; }

    这样的实体,转换失败:
    42804: column "displaynotice" is of type timestamp without time zone but default expression is of type integer”
    怎么是 timestamp  呢?

    image.png

    0 回复