update comment

This commit is contained in:
daheige 2021-06-14 15:42:48 +08:00
parent aefcf017dc
commit b79bf9f463

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)