-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Columns with default values are appended onto queries no matter what. #490
Comments
Yes, You can use |
I see. That most definitely clears up my confusion, thanks. I probably should have looked a little more deeper into the documentation and have found A little bit later: I just read through all tags and I guess |
No scanonly doesnt do what you are looking for. Take a look at #489 |
I don't have better ideas how to handle this. Sometimes people want to marshal empty values as
I will slightly re-word docs for scanonly option. |
Are columns that have default values yet no value assigned to said field supposed to be appended onto a query?
For example - take this table;
If I were to try and insert this accordingly, without including ID for said instance, for example
db.NewInsert().Model(&User{ Email: "email" }).Exec(context)
- it would cause the 22P02 (invalid text representation) error due to id not being specified and emptied out on query appendices.Is there a way of handling this manually or ignoring fields on specifically INSERT operations?
The text was updated successfully, but these errors were encountered: