(fix) remove hacks in `session_insert` `(*Session) insertStruct`

This commit is contained in:
datbeohbbh 2023-09-23 23:00:44 +07:00
parent b2b647f9ca
commit 6dd92ce6f2
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ func (session *Session) insertStruct(bean interface{}) (int64, error) {
} }
// if there is auto increment column and driver don't support return it // if there is auto increment column and driver don't support return it
if len(table.AutoIncrement) > 0 && !session.engine.driver.Features().SupportReturnInsertedID && session.engine.dialect.URI().DBType != schemas.YDB { if len(table.AutoIncrement) > 0 && !session.engine.driver.Features().SupportReturnInsertedID {
var sql string var sql string
var newArgs []interface{} var newArgs []interface{}
var needCommit bool var needCommit bool