Field with @CreationTimestamp annotation is null while save on repository

It’s 2020, hibernate-core-5.3.12, and still need to set updatable to false.

@CreationTimestamp      
@Column(updatable = false)
private LocalDateTime createdDate;

Update

I believe there will be no fix for this because this CreationTimestamp is from native hibernate package (org.hibernate.annotations), and I believe the efforts will be on the jpa abstraction (org.springframework.data.annotation.CreatedBy)

Leave a Comment