-
Notifications
You must be signed in to change notification settings - Fork 67
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
Used with GORM resulting in errors for simple queries. May be relate to column name not lowercase #65
Comments
using Postgres driver as instructed |
Seems to actually be related to #62 |
I would if I knew how to see that. I dove into the GORM code and there isn't anywhere that it shows me the SQL it is creating. The reason that I believe it is related is that I removed the conditional above and it is explicitly giving a Syntax error on a quote " ... this leads me to believe it is the same issue. You can see my line of code where we are doing a .First function on the driver and supplying the request model that would be filled. |
I managed to output the sql queries but it is still failing. I am happy to try and fix for you but I don't know how to break into a debugger for this code. stepping through my code it gets into GORM but not into your driver code. SELECT * FROM "requests" WHERE Token = 'token1238' ORDER BY "requests"."token" LIMIT 1
SELECT * FROM "guard_rails" WHERE "guard_rails"."name" IN (NULL)
SELECT * FROM "accounts" WHERE "accounts"."id" = '11223333' ORDER BY "accounts"."id" LIMIT 1
SELECT * FROM "requests" WHERE ID = '4cacb10dd' ORDER BY "requests"."token" LIMIT 1
These are just a few examples. Please tell me how to debug into the code and I can look into fixing |
This was with the fix for #62. |
result := db.First(&Request{}, "Token = ?", request.Token)
Results in: Syntax error near . " token"
The text was updated successfully, but these errors were encountered: