Skip to content

Why is updatedAt by default null #8

@mariusfaber98

Description

@mariusfaber98

I wanted to use this bundle because it uses DateTimeImmutable instead of DateTime, unlike the Gedmo TimestampableEntity trait.
My question is: why does this bundle set updatedAt to null by default, instead of assigning it the same value as createdAt?
That way, you could easily sort by updatedAt even if a row has only been created and not updated yet.
I believe it would be much more convenient if both updatedAt and createdAt were initialized with the same timestamp.
Is there any specific reason for this behavior that I might be missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions