zhuxiujia / GoMybatis

Go ORM Library.Have Powerful Features like transaction nesting, Optimistic Lock,Logical deletion and more. like mybatis for go golang
https://zhuxiujia.github.io/gomybatis.io/#/
Apache License 2.0
430 stars 96 forks source link

sql查询结果解码相关问题 #43

Closed dxwy2001 closed 4 years ago

dxwy2001 commented 4 years ago

Decode方法中如果struct 的json tag 跟数据表的字段定义不一致会无法导出

zhuxiujia commented 4 years ago

Decode方法中如果struct 的json tag 跟数据表的字段定义不一致会无法导出

试试最新的版本

zhuxiujia commented 4 years ago

Decode方法中如果struct 的json tag 跟数据表的字段定义不一致会无法导出

GoMybatis 本身就规定json tag 必须和表字段一抹一样,比如json是 del_flag 那么表字段也是。这样能方便的数据对应,不会 因为 驼峰转换问题带来麻烦