go-gorm / gorm

The fantastic ORM library for Golang, aims to be developer friendly
https://gorm.io
MIT License
36.92k stars 3.93k forks source link

Where Condition Build Issue #7002

Open VarusHsu opened 6 months ago

VarusHsu commented 6 months ago

GORM Playground Link

https://github.com/go-gorm/playground/pull/728

Description

I have my sql query with multi Where conditions. When using || instead of OR, there are different rows fetched due to brackets. Is there a bug or designed like this ?

WeChatWorkScreenshot_bef48b6d-29d7-45bc-a0d1-fa70d830bf9d
github-actions[bot] commented 6 months ago

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.ioSearch Before Asking

VarusHsu commented 6 months ago

pr link see: https://github.com/go-gorm/gorm/pull/7004