refactor: 优化数据库查询构建链式调用

This commit is contained in:
2026-03-28 11:10:02 +08:00
parent ac6beab363
commit f85314f119
2 changed files with 64 additions and 1 deletions

View File

@@ -440,7 +440,7 @@ func (d *dataBase) Model(ctx context.Context, tableNameOrStruct ...any) *model {
m.Sharding(shardingConfig).ShardingValue(user.TenantId)
}
m.OmitNil().OmitEmpty().Hook(catchSQLHook())
m.OmitNil().Hook(catchSQLHook())
return &model{
Model: m,
}