Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use qor admin with gorm.io/gorm #251

Open
hpdipto opened this issue Apr 22, 2021 · 11 comments
Open

how to use qor admin with gorm.io/gorm #251

hpdipto opened this issue Apr 22, 2021 · 11 comments

Comments

@hpdipto
Copy link

hpdipto commented Apr 22, 2021

When I'm trying to use qor with gorm.io/gorm, I got this error
cannot use DB (type *"gorm.io/gorm".DB) as type *"github.com/jinzhu/gorm".DB in field value
how can I deal with this problem?

@NilsJPWerner
Copy link

Yeah I think qor needs to be updated to support gorm 2. It seems all development of gorm has shifted to the new version.

@raven-chen
Copy link
Member

hi @hpdipto

What specific feature do you want to use in gorm 2.0? We do have a plan to migrate qor to gorm 2.0, but haven't evaluated the impact and benefit. it would be helpful if you can show us your requirement.

@hpdipto
Copy link
Author

hpdipto commented May 14, 2021

hi @hpdipto

What specific feature do you want to use in gorm 2.0? We do have a plan to migrate qor to gorm 2.0, but haven't evaluated the impact and benefit. it would be helpful if you can show us your requirement.

Actually I can't mention very specific feature of gorm 2.0 that I want to use. But why should I incorporate an old version in my code base?

@NilsJPWerner
Copy link

Gorm 2 has a host of new useful features like batch insert better clause support and more. We want to move to it so we get continued support and to get access to all the other features.

@KhalifaGad
Copy link

any updates?

@benjfield
Copy link

Do we have an update on this please? Gorm 1.9 has been dead for over a year and is pinned to use a version of a postgres driver that is 14 months or so older than that.

@zareef26
Copy link

zareef26 commented Feb 1, 2022

Any updates?

@jpmeijers
Copy link

I'm trying to add Qor to an existing code base. My existing code has been ported to Gorm 2 a very long time ago. I was shocked to see Qor only supports the old version.

Gorm 2 has much better support for indexes in Postgres than the previous one, so there is no option of downgrading.

What is the status of porting Qor to Gorm 2, and is there perhaps a workaround like force casting the Db object to the correct type which we can do in the meantime?

@ElegantSoft
Copy link

Any updates or fork fixes this problem

@WalterNyeko
Copy link

Kind of hard to believe that there is no fix yet after 1 year.

@fanshuai
Copy link

fanshuai commented May 1, 2024

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants