Skip to content

createdAt field annotated with @CreationDate gets updated when an entity is modified. [using spring boot 3.0.4] #2844

Closed
@isatishp

Description

@isatishp

When an entity is modified, we see that created time gets updated. This happens with newly created entity, for older entities it works fine.

Steps to reproduce:

  1. Create an entity which has fields annotated with @CreatedDate @ModifiedDate and @EntityListeners(AuditingEntityListener.class)
  2. Save the entity using JPA Repository class
  3. Update the entity
  4. And, you see updated entity has creationDate from the future

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions