-
Notifications
You must be signed in to change notification settings - Fork 917
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
mysql 模型字段与数据库类型struct->json类型的支持 #911
Comments
什么意思? |
mysql json 类型映射的时候不支持通过bee generate自动化的生成代码,现在改修的项目有大量的json类型 |
哦哦,你是指字段里面存储JSON字符串是吧?这是计划中的事情,之前有一个外国开发来了一个PR,不过无法通过UT,还有很多问题,后面他就自己关了。 你可以自己定义Fielder来扩展。不过目测有点难度…… |
等我这段时间加完班腾出手来搞搞 |
测试model type GoodsImages []string
func (e *GoodsImages) FieldType() int {
return orm.TypeJSONField
}
type Skus struct {
GoodsImages GoodsImages `orm:"type(json);description(商品图片)"`
} mysql 自动创建表时生成的mysql语法: |
要等等等一会了……最近巨忙…… |
mysql 模型字段与数据库类型struct->json类型的支持
The text was updated successfully, but these errors were encountered: