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

Related issues

satb picture satb  路  3Comments

bramp picture bramp  路  3Comments

pjebs picture pjebs  路  3Comments

fieryorc picture fieryorc  路  3Comments

kumarsiva07 picture kumarsiva07  路  3Comments