diff --git a/pkg/ast/model/table_funcs.go.tpl b/pkg/ast/model/table_funcs.go.tpl index 0fcca58..894b61d 100644 --- a/pkg/ast/model/table_funcs.go.tpl +++ b/pkg/ast/model/table_funcs.go.tpl @@ -141,7 +141,7 @@ func (m *{{.PascalTable}}) GetByID(ctx context.Context, id int64, conds ...BoolE expr = expr.AND(c) } } - stmt := table.{{.PascalTable}}.SELECT(table.{{.PascalTable}}.AllColumns).WHERE() + stmt := table.{{.PascalTable}}.SELECT(table.{{.PascalTable}}.AllColumns).WHERE(expr) m.log().WithField("func", "GetByID").Info(stmt.DebugSql()) if err := stmt.QueryContext(ctx, db, m); err != nil {