GORM Playground Link

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

Description

gorm v2组查询时,使用.Table与不使用生成的sql不一样 This parameter is used to query the gorm v2 group. Table is not the same as sql generated without using it

` db, _ := gorm.Open(sqlite.Open("gorm.db"), &gorm.Config{})

pizzas := struct {
}{}
db.Table("microloan.account_base").Where(
    db.Where("pizza = ?", "pepperoni").Where(db.Where("size = ?", "small").Or("size = ?", "medium")),
).Or(
    db.Where("pizza = ?", "hawaiian").Where("size = ?", "xlarge"),
).Find(&pizzas)

db = db.Table("microloan.account_base")
db.Where(
    db.Where("pizza = ?", "pepperoni").Where(db.Where("size = ?", "small").Or("size = ?", "medium")),
).Or(
    db.Where("pizza = ?", "hawaiian").Where("size = ?", "xlarge"),
).Find(&pizzas)

`

this not use 2023/08/08 15:06:09 [0.122ms] [rows:0] SELECT * FROM microloan.account_base WHERE (pizza = "pepperoni" AND (size = "small" OR size = "medium")) OR (pizza = "hawaiian" AND size = "xlarge")

this used 2023/08/08 15:06:09 [0.025ms] [rows:0] SELECT * FROM microloan.account_base WHERE ((pizza = "pepperoni" AND size = "small" OR size = "medium") AND pizza = "hawaiian" AND size = "xlarge")

I need to specify 'database.table' using 'table()', but I want the result of the first. Or is there another way to specify a database?

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