Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Dec 26, 2024
1 parent 55e6b02 commit e71008e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/gf/internal/consts/consts_gen_dao_template_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ func (dao *{{.TplTableNameCamelCase}}Dao) Group() string {
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
func (dao *{{.TplTableNameCamelCase}}Dao) Ctx(ctx context.Context) *gdb.Model {
model := dao.DB().Model(dao.table).Safe().Ctx(ctx)
model := dao.DB().Model(dao.table)
for _, handler := range dao.handlers {
model = handler(model)
}
return model
return model.Safe().Ctx(ctx)
}
// Transaction wraps the transaction logic using function f.
Expand Down

0 comments on commit e71008e

Please # to comment.