update comment for ConvertSliceOfMapToValuesForCreate func

This commit is contained in:
daheige 2021-07-14 21:56:58 +08:00 committed by Jason Lee
parent 3e15478534
commit 41ac73b6a1
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ func ConvertSliceOfMapToValuesForCreate(stmt *gorm.Statement, mapValues []map[st
columns = make([]string, 0, len(mapValues)) columns = make([]string, 0, len(mapValues))
) )
// when the length of mapValues,return directly here // when the length of mapValues is zero,return directly here
// no need to call stmt.SelectAndOmitColumns method // no need to call stmt.SelectAndOmitColumns method
if len(mapValues) == 0 { if len(mapValues) == 0 {
stmt.AddError(gorm.ErrEmptySlice) stmt.AddError(gorm.ErrEmptySlice)