python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
GORM GOLANG/Go msSQL UNIQUEIDENTIFIER inside struct
Hello I have the struct like here named person and when I call my rest endpoint and get data from mssql database (where ID is
ID UNIQUEIDENTIFIER DEFAULT NEWSEQUENTIALID() )
package entities import ( ...
EagleCode
Votes: 0
Answers: 3
GORM Associations Preload not work with primary key ID int = 0
I have two models below
type Bot struct {
gorm.Model
Name string
ExchangeID uint
Exchange Exchange
}
type Exchange struct {
gorm.Model
Image string
Status ...
Hoang Viet Nguyen
Votes: 0
Answers: 0
There is already an object named 'company_names' in the database
I use Gorm for Golang like this code,
func Connect() (*gorm.DB, error) {
var (
err error
db *gorm.DB
)
dsn := "sqlserver://User:12345@127.0.0.1:1433?database=gorm"
db, err = gorm.O...
sunny
Votes: 0
Answers: 0
Gorm - how to access nullable fields when using pointers?
I'm new to Go and still learning about optional struct fields.
I'm looking at the Gorm manual page where it gives an example of using pointers to indicate nullable fields (here)
If I strip down the ex...
Andy
Votes: 0
Answers: 1