Category "go-gorm"

Build error in Go/Golang: Column does not implement gorm.ColumnType (missing AutoIncrement method)

I am facing this build error in Golang V1.17 intermittently. # gorm.io/driver/mysql ../../../../pkg/mod/gorm.io/driver/[email protected]/migrator.go:224:24: cannot u

How can i add enum in gorm?

I am writing PostgreSQL table schema. type TestTable struct { ID int `gorm:"column:id;primaryKey;autoIncrement"` CarType string `gorm:"colum

Golang: Gorm Error on insert or update on table violates foreign key contraint

Im trying to create a REST service using Gorm that on startup will drop the database tables from my Postgres DB and then create and populate them with test data

GORM select certain column with preload

Let's say I have these struct that represent my models type QuestionHeader struct { QuestionHeaderId int `gorm:"primaryKey;column:question_id" json:"questi

Gorm Update and Get the Updated Rows in a single operation?

Is there any way to get the rows that have been updated using the update command in Gorm, using a single operation.

Go_gorm: AutoMigrate with foreignKey( Failed to open the referenced table )

I've just entered stuyding Go language and try to use gorm connecting w MySQL. When I try to create tables with foreign key, it gives me same error "Error 1824:

How to Go/Gorm a megamenu?

I'm writing an e-commerce app in Go, and I've been stuck on the megamenu for a while now, trying to implement it with PostgreSQL tables. The end result, JSON re

Gorm: Is it possible to define shared methods for common db operations (e.g get by id)?

Using go and gorm in a project. I have created a dao level to wrap the database operations, each table has its own dao type. Current code Get method from FirstD

Gorm and Gin error 500 only when Updating

I've a pretty simple CRUD for a Task list, and so far I'm able to Create, List all, List by ID and Delete records, bu when I try to update, it gives me the foll

GO storing data returns EOF

I'm new to golang and I'm trying to build rest api, So far GET endpoints are working for me fine, but I'm having difficulties with POST method(creating user): T

How to get Returning value in Gorm Postgress

I have created an serial_num (auto incremented/ serial type ) column in our postgress db. my contact struct type is as of below and i am using upsert operation