CengSin / oracle

GORM oracle driver
Other
112 stars 43 forks source link

go get github.com/cengsin/oracle # github.com/cengsin/oracle ../../../../../pkg/mod/github.com/cengsin/oracle@v1.0.0/oracle.go:53:59: unknown field 'WithReturning' in struct literal of type callbacks.Config #17

Open inix opened 2 years ago

inix commented 2 years ago
go get github.com/cengsin/oracle
# github.com/cengsin/oracle
../../../../../pkg/mod/github.com/cengsin/oracle@v1.0.0/oracle.go:53:59: unknown field 'WithReturning' in struct literal of type callbacks.Config
xiyichan commented 2 years ago

这个我也遇到了,要降级gorm 到1.21的版本

inix commented 2 years ago

这个我也遇到了,要降级gorm 到1.21的版本

我换了另一个库,哈哈

xiyichan commented 2 years ago

这个我也遇到了,要降级gorm 到1.21的版本

我换了另一个库,哈哈

用了哪个可以支持oracle

cheesetree commented 2 years ago

这边改下
// register callbacks callbacks.RegisterDefaultCallbacks(db, &callbacks.Config{ UpdateClauses: []string{"UPDATE", "SET", "WHERE", "ORDER BY", "RETURNING"}, })

austin-millan commented 2 years ago

Use gorm.io/gorm v1.20.5 as workaround, this driver is too old and not maintained enough for latest gorm releases.

dzwvip commented 2 years ago

https://github.com/dzwvip/oracle 支持 gorm 1.23.4

huntepr1billpay commented 2 years ago

Hello, I used your https://github.com/dzwvip/oracle and it fixed the issues of the older version. However, when I choose to overwrite the default for: db, err := gorm.Open(oracle.Open(connStr), &gorm.Config{ NamingStrategy: schema.NamingStrategy{ SingularTable: true, }, }) The code is still appending an "s" on the end of the table names.

dzwvip commented 2 years ago

Hello, I used your https://github.com/dzwvip/oracle and it fixed the issues of the older version. However, when I choose to overwrite the default for: db, err := gorm.Open(oracle.Open(connStr), &gorm.Config{ NamingStrategy: schema.NamingStrategy{ SingularTable: true, }, }) The code is still appending an "s" on the end of the table names.

already fixed