Since upgrading gorm version from 1.23.8 to 1.23.10 Changelog

Updating using pattern: db.Model(MyTable{}).Update("col_1 = ?", col1).Update("col_2 = ?", col2) will only produce just 1 (one) SQL: UPDATE MyTable SET col1=col1Value

In 1.23.8 gorm would produce 2 (two) seperate SQL statement: UPDATE MyTable SET col1=col1Value and subsequently UPDATE MyTable SET col2=col2Value

I had to change my code to use Updates() instead as workaround. Which is good because I have been wanting to refactor the code to update both column in single statement anyway.

Just thought you all might want to know this. I do realize Update() is intended for single-column update and my use case require me to use Updates(). But it works before. Just wondering if gorm had decided to remove this feature or its a bug.

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: a631807682

https://gorm.io/docs/method_chaining.html#New-Session-Method

But it works before. Just wondering if gorm had decided to remove this feature or its a bug.

Cause by this change https://github.com/go-gorm/gorm/commit/490625981a1c3474eeca7f2e4fde791cd94c84fa, but as the docs say, we don't promise that it's safe to reuse gorm instances, so it's not a feature.