值类型的对象在SQLITE中会报错 返回

SqlSugar
253
该叫什么 JIE 发布于1周前
悬赏:0 飞吻

版本 NET 8.0

数据库:SQLITE

接口返回错误:

{  "statusCode": 500,  "errorCode": 500,  "error": "Object of type 'System.Int64' cannot be converted to type 'System.Int32'.",  "data": null,  "timestamp": 1780474788677 }


实体类:

    [SugarColumn(IsOwnsOne = true)]

    public ImageNoVO ImageNoVO { get; set; }


值对象:

捕获.PNG

数据库表:

捕获.PNG提示:如果把这个“ 
 [SugarColumn(IsOwnsOne = true)]

public ImageNoVO ImageNoVO { get; set; }” 注释,则接口返回没有报错。

或者把 值对象 int 修改 long,则接口返回成功。

或者把 三个参数放在  “T_ImageInfo” 实体中,并注释  “ImageNoVO ImageNoVO”,则接口返回成功。

热忱回答0