Skip to content

Commit

Permalink
Fix insert id order for mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Mar 21, 2024
1 parent d848c69 commit 9d1b8d6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ func (dialector Dialector) Initialize(db *gorm.DB) (err error) {
}

if !dialector.Config.DisableWithReturning && withReturning {
callbackConfig.LastInsertIDReversed = true

if !utils.Contains(callbackConfig.CreateClauses, "RETURNING") {
callbackConfig.CreateClauses = append(callbackConfig.CreateClauses, "RETURNING")
}
Expand Down

0 comments on commit 9d1b8d6

Please sign in to comment.