fix bug on postgres

This commit is contained in:
Lunny Xiao 2019-10-02 09:29:49 +08:00
parent ddefae3150
commit 375a267912
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 2 additions and 2 deletions

View File

@ -251,11 +251,11 @@ func (session *Session) Sync2(beans ...interface{}) error {
} else {
tbName = engine.TableName(bean)
}
tbNameWithSchema := engine.TableName(tbName, true)
tbNameWithSchema := engine.tbNameWithSchema(tbName)
var oriTable *core.Table
for _, tb := range tables {
if strings.EqualFold(engine.TableName(tb.Name, true), tbName) {
if strings.EqualFold(engine.tbNameWithSchema(tb.Name), engine.tbNameWithSchema(tbName)) {
oriTable = tb
break
}