mirror of
http://github.com/goal-web/database
synced 2025-12-24 10:40:53 +08:00
fix: 修复默认链接情况的bug
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user