mysql5.7版本中json类型的数据插入空数组,数据为null #1457

Open
opened 2019-10-12 03:36:13 +00:00 by mengxiaotian · 0 comments
mengxiaotian commented 2019-10-12 03:36:13 +00:00 (Migrated from github.com)

model设定类型为
image

当teachers为空数组([]),执行语句:_, err := engine.Cols("teachers").Update(teacher)
插入数据成功,但是数据库中的数据是null

model设定类型为 ![image](https://user-images.githubusercontent.com/13913243/66694248-12958c00-ece4-11e9-9baf-64e4c656811b.png), 当teachers为空数组([]),执行语句:_, err := engine.Cols("teachers").Update(teacher) 插入数据成功,但是数据库中的数据是null
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1457
No description provided.