-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
panic with sql:"-" field set #945
Comments
Hi, I can't reproduce this on latest master. Can you to upgrade go-pg and create a reproducer? |
Hi, dep init has set up a specific version [[constraint]]
name = "github.com/go-pg/pg"
version = "6.14.3" I will try on master branch and if I do have the same behavior, I will try to setup a reproducer |
After updating, It works, I no longer have the panic. Thanks |
Arf mybad, I did it too fast, my db was empty so no data were found, after adding some data, it actually fails again :/ I will try to set up a reproducer |
https://github.com/Tommy-42/go-pg-error-reproducer It should fail with the same error |
I will fix the panic by returning an error, but overall you should initialize the user on https://github.com/Tommy-42/go-pg-error-reproducer/blob/master/main.go#L47, e.g. via |
Hello,
I am using golang/protobuf in one of my project which has an older version that another one that I am currently working on ( which has the very last one ).
For some reason, they implemented some "breaking change" to the generated code ( they add 3 more fields to the generated struct.
for example :
generated :
but now generates :
So you may start understanding what problem it could cause with go-pg ... :(
I do have found a way to append
sql:"-"
tag with github.com/favadi/protoc-go-inject-tagto the struct
but when I do :
I've got a panic :
the panic happens when I add
sql:"-"
to the struct, If I remove it, I have the famousERROR #42703 column user.xxx__no_unkeyed_literal does not exist (addr="127.0.0.1:5432")
do you have an idea on how to resolve this ?
I may have done something wrong ...
thanks for your help
The text was updated successfully, but these errors were encountered: