Skip to content

database/gdb: create/update/delele time should not be overridden if it has been specified #3613

@jswxstw

Description

@jswxstw

Go version

go version go1.21.3 darwin/amd64

GoFrame version

2.7.1

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

dao.InstanceRisk.Ctx(ctx).Insert(do.InstanceRisk{
    InstanceId:   in.InstanceId,
    TypeId:       riskType.Id,
    CreatedAt:    in.CreatedAt,
})

Insert a new record with created_at already specified.

What did you see happen?

The value of created_at is overridden by NOW().

What did you expect to see?

The value of created_at should be the specified value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt is confirmed a bug, but don't worry, we'll handle it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions