diff --git a/callback_query_preload.go b/callback_query_preload.go index fff252c9..21ab22ce 100644 --- a/callback_query_preload.go +++ b/callback_query_preload.go @@ -289,7 +289,12 @@ func (scope *Scope) handleManyToManyPreload(field *Field, conditions []interface // generate query with join table newScope := scope.New(reflect.New(fieldType).Interface()) - preloadDB = preloadDB.Table(newScope.TableName()).Model(newScope.Value).Select("*") + preloadDB = preloadDB.Table(newScope.TableName()).Model(newScope.Value) + + if len(preloadDB.search.selects) == 0 { + preloadDB = preloadDB.Select("*") + } + preloadDB = joinTableHandler.JoinWith(joinTableHandler, preloadDB, scope.Value) // preload inline conditions