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

gorm v1.25.6 : Create error when using map[string]interface{} with Postgres #6812

magellancl opened this issue Jan 30, 2024 · 2 comments
type:with reproduction steps with reproduction steps


Copy link

GORM Playground Link



Related to go-gormigrate/gormigrate#217

This library is using customizable table and column name, so Create is used this way :

	columnName := "name"
	user := map[string]interface{}{columnName: "id"}
	err := DB.Table("users").Create(user).Error

which return the error "LastInsertId is not supported by this driver", instead of creating the record

Copy link

If this won't be patched, do you have a solution in order to patch the library?

Copy link

this error is preventing me from upgrading my service! any help would be greatly appreciated

@jinzhu jinzhu closed this as completed in 81536f8 Mar 19, 2024
snackmgmg added a commit to snackmgmg/gorm that referenced this issue Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
type:with reproduction steps with reproduction steps
None yet

No branches or pull requests

4 participants