Your Question

I run a procedure with GORM but the data is missing. There are shifts in data sets. I will give an example according to the Stock structure below. StockCode comes instead of Barcode. I made checks for that. I did not get such an error when I ran the query in the database. I'm not sure if this is a bug. Is there any other usage other than the following usage?

The document you expected this should be explained

Struct: type Stock struct { StockCode string Barcode string StockName string ProductImage string } Gorm Snippets:

var stock []Stock MicroDB.Raw("exec Company_Stocks;").Scan(&stock) // I also tried the find() method for _, v := range stock{ fmt.Println(v.Barcode, v.ProductImage) }

Expected answer

What is the right way to use procedures in GORM?