GORM Playground Link
https://github.com/go-gorm/playground/pull/784
Description
At some point in the last few releases, I think that the Where builder has lost the ability to wrap parentheses around some multiline clauses, which causes some issues when those clauses contain an OR
. We have several instances of these in our codebase that ran fine under Gorm v1.21.15, but we ran into some test failures when attempting to upgrade to the latest version.
Comment From: sam-wbcx
Glancing over the code, I think this may be due to the lack of a space before the "OR" (I think it can be some other whitespace characters, like newline or tab) https://github.com/go-gorm/gorm/blob/master/clause/where.go#L9
Comment From: sam-wbcx
@jinzhu If you agree that this is the issue, I could put together a PR that changes that string equality to be a match against a regexp.MustCompile (if that would help!)