diff --git a/exec/exec.go b/exec/exec.go index 3d46575..72bd1e9 100644 --- a/exec/exec.go +++ b/exec/exec.go @@ -288,7 +288,17 @@ func (ins *Insert[T]) execute(conn *simpleorm.DBConnection, tx *sql.Tx) error { } defer stmt.Close() - rows, err := stmt.Query(params...) + // Flattent args to make sure it can be parsed correctly + var flatParams []any + for _, param := range params { + if s, ok := param.([]any); ok { + flatParams = append(flatParams, s...) + } else { + flatParams = append(flatParams, param) + } + } + + rows, err := stmt.Query(flatParams...) if err != nil { return err