Gorm: CreatedAt is overrided by gorm even if explicitly set by caller.

Created on 15 Mar 2018  路  2Comments  路  Source: go-gorm/gorm

I'm trying to do this.

model.CreatedAt = created_at
db.Create(&model)

But the field is overrided with time.Now().

Is it possible to avoid this behavior?

Most helpful comment

For anyone who is encountered this problem, this is solved in newer versions, see 1.9.1

@jinzhu Close this issue please

All 2 comments

Still actual

For anyone who is encountered this problem, this is solved in newer versions, see 1.9.1

@jinzhu Close this issue please

Was this page helpful?
0 / 5 - 0 ratings