Skip to content

Breaking change in gorm v1.6.0 #809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nikiepaydk
Copy link

Explain your user case and expected results

When updating from v1.5.7 to v1.6.0 there is a breaking change related to where conditions and joins.

Earlier this worked for these versions

- gorm.io/driver/mysql v1.5.7
- gorm.io/driver/postgres v1.5.11
- gorm.io/driver/sqlite v1.5.7
- gorm.io/gorm v1.25.12
- gorm.io/plugin/dbresolver v1.5.3

When updating to 1.6.0 it breaks. The change in the where condition goes from

accounts.number = "test"

to

`users`.`accounts`.`number` = "test"

Resulting in an error: no such column: users.accounts.number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant