1

I am facing an issue with Gorm using Gin. On the code level, there have been no changes. However, the issue that I am facing is that when I run a query using Gorm, it gives me no records, while when I run the same query in SQL Workbench, it shows me the result.

Additionally, I am getting a new error where when querying through Gorm, it is coming as an invalid connection after taking 30 seconds, and the query times out. However, in SQL Workbench, the same query executes within 5 seconds.

Can anyone help me diagnose and solve this issue?

looking for solution over multiple sources but couldn't find any

  • 2
    Please post the code you've tried – Dominic May 18 '23 at 07:34
  • I guess you can write a unit test to query something by the connection you created by `Gorm`. `it is coming as an invalid connection after taking 30 seconds, and the query times out` sounds like you didn't open the connection by the correct way, or your DB connection changed before you execute the query. – spike014 May 18 '23 at 07:38
  • Correct your connection info. – Cetin Basoz May 18 '23 at 07:46

0 Answers0