GORM Playground Link

在原来 github.com/jinzhu/gorm 的项目中有 db.Order(gorm.Expr("id, ?", []int{1, 2, 3})) // sql expression 这样的一种写法。但迁移到gorm.io 后,这个写法不生效了。Order 方法里的断言不判断这个 clause.Expr 的类型了。 然后需要在业务代码层面这样写,感觉没有以前的优雅了。 db.Clauses(clause.OrderBy{ Expression: clause.Expr{SQL: "FIELD(id,?)", Vars: []interface{}{[]int{1, 2, 3}}, WithoutParentheses: true},}).Find(&User{}) 请问还有把这个写法加回去的想法么?:D

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

Description

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