fix: 修复默认链接情况的bug

This commit is contained in:
qbhy
2022-01-26 00:17:16 +08:00
parent 22bed49538
commit a14198ddc7

View File

@@ -39,7 +39,7 @@ func FromModel(model contracts.Model) *Table {
// WithConnection 使用指定链接
func WithConnection(name string, connection interface{}) *Table {
if connection == "" || connection == nil {
return getTable(name)
return Query(name)
}
return getTable(name).SetConnection(connection)
}