Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.
This repository was archived by the owner on Sep 7, 2021. It is now read-only.

批量Insert时Omit出错 #1143

@eleztian

Description

@eleztian

在操作mysql时,我在update中去掉end_time字段插入, 下面第一种可以正常进行。

for _, v := range in { _, err := dstSession.Omit("end_time").Insert(v) if err != nil { panic(err) } }

但是,这样会报 Error 1048: Column 'end_time' cannot be null

_, err := dstSession.Omit("end_time").Insert(in....) if err != nil { panic(err) }

这是为啥???

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions