diff --git a/callbacks/query.go b/callbacks/query.go index d660528c..68c322c1 100644 --- a/callbacks/query.go +++ b/callbacks/query.go @@ -75,7 +75,7 @@ func BuildQuerySQL(db *gorm.DB) { smallerStruct := false switch db.Statement.ReflectValue.Kind() { case reflect.Struct: - smallerStruct = db.Statement.ReflectValue.Type() != db.Statement.Schema.ModelType + smallerStruct = true case reflect.Slice: smallerStruct = db.Statement.ReflectValue.Type().Elem() != db.Statement.Schema.ModelType }