We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go-gorm/playground#742
db.Save updates CreatedAt with a zero value. Then throws an error. Gorm should automatically handle CreatedAt and ignore zero values, right?
db.Create sets UpdatedAt to the current time, shouldn't it be null?
The text was updated successfully, but these errors were encountered:
Create will fill the created_at field if it is empty, but Save will not do so with a blank primary key.
Create
Save
Sorry, something went wrong.
jinzhu
No branches or pull requests
GORM Playground Link
go-gorm/playground#742
Description
db.Save updates CreatedAt with a zero value. Then throws an error. Gorm should automatically handle CreatedAt and ignore zero values, right?
db.Create sets UpdatedAt to the current time, shouldn't it be null?
The text was updated successfully, but these errors were encountered: