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

NewAdapterByDB failed due to different gorm type #55

Closed
kevinniu666 opened this issue Oct 14, 2020 · 1 comment
Closed

NewAdapterByDB failed due to different gorm type #55

kevinniu666 opened this issue Oct 14, 2020 · 1 comment
Assignees
Labels

Comments

@kevinniu666
Copy link

tried to use exsit gorm instance which is "github.com/jinzhu/gorm", failed due to below error:

Cannot use 'component.DB' (type *"github.com/jinzhu/gorm".DB) as type *"gorm.io/gorm".DB

//code sample

adapter, err := gormadapter.NewAdapterByDB(component.DB)

@hsluoyz
Copy link
Member

hsluoyz commented Oct 14, 2020

github.com/jinzhu/gorm path is deprecated. Please update it to use gorm.io/gorm instead.

@hsluoyz hsluoyz closed this as completed Oct 14, 2020
@hsluoyz hsluoyz self-assigned this Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants