-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
type:with reproduction stepswith reproduction stepswith reproduction steps
Description
GORM Playground Link
https://github.com/daashuun/playground
Description
I tried to make
SELECT * FROM "test" WHERE a = 1 AND (b = 2 OR c = 3)
but this request
DB.Table("test").Scopes(
func(d *gorm.DB) *gorm.DB {
return d.Where("a = 1")
},
func(d *gorm.DB) *gorm.DB {
return d.Where(d.Or("b = 2").Or("c = 3"))
},
).Rows()
makes sql
SELECT * FROM "test" WHERE a = 1 OR b = 2 OR c = 3 AND (a = 1 OR b = 2 OR c = 3)
Metadata
Metadata
Assignees
Labels
type:with reproduction stepswith reproduction stepswith reproduction steps