Fix batch insert

This commit is contained in:
Lunny Xiao 2020-04-12 20:39:30 +08:00
parent 9d6cfff9ac
commit 561191a079
2 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,7 @@ func TestBuilder(t *testing.T) {
assert.EqualValues(t, 1, len(conds), "records should exist")
conds = make([]Condition, 0)
err = testEngine.NotIn("col_name", "col1", "col2").Find(&conds)
err = testEngine.NotIn("`col_name`", "col1", "col2").Find(&conds)
assert.NoError(t, err)
assert.EqualValues(t, 0, len(conds), "records should not exist")

View File

@ -91,6 +91,7 @@ func (session *Session) insertMultipleStruct(rowsSlicePtr interface{}) (int64, e
colMultiPlaces []string
args []interface{}
cols []*schemas.Column
insertCnt int
)
for i := 0; i < size; i++ {