gen icon indicating copy to clipboard operation
gen copied to clipboard

是否支持通过ctx来确定tablename

Open notech opened this issue 2 years ago • 0 comments

是否支持通过ctx来确定tablename

gorm的tablename方法 不能定义参数, 对于 多租户系统来说, 通常会使用基于schema隔离的方式,如PGSQL,中 tenant_schema.tablename. 这就依赖ctx传入对应的 租户ID, 这种方式在构建 连接查询时十分有必要。

The document you expected this should be explained

Expected answer

notech avatar Aug 29 '22 06:08 notech