Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating an entity updates the creation timestamp (and the update timestamp) #2138

Open
DavideD opened this issue Mar 3, 2025 · 0 comments · May be fixed by #2172 or #2199
Open

Updating an entity updates the creation timestamp (and the update timestamp) #2138

DavideD opened this issue Mar 3, 2025 · 0 comments · May be fixed by #2172 or #2199
Assignees
Labels
bug Something isn't working quarkus The issue links an issue in Quarkus

Comments

@DavideD
Copy link
Member

DavideD commented Mar 3, 2025

See quarkusio/quarkus#39016

We need to check if this is actually happening in Hibernate Reactive and add tests for it (if we don't have some already).

After updating an entity both createdAt and updatedAt are returned with the the updatedAt value. However, createdAt is not being persisted to the database. When I list the records from the database the results are returned correctly. I'm using the same DTO object for both operations.

Column(name = "created_at", updatable = false, nullable = false)
@CreationTimestamp
public LocalDateTime createdAt;

@Column(name = "updated_at", nullable = false)
@UpdateTimestamp
public LocalDateTime updatedAt;
marko-bekhta added a commit to marko-bekhta/hibernate-reactive that referenced this issue Mar 31, 2025
marko-bekhta added a commit to marko-bekhta/hibernate-reactive that referenced this issue Apr 7, 2025
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Apr 8, 2025
@DavideD DavideD linked a pull request Apr 8, 2025 that will close this issue
@DavideD DavideD added bug Something isn't working quarkus The issue links an issue in Quarkus labels Apr 8, 2025
@DavideD DavideD changed the title persistAndFlush with @CreationTimeStamp and @UpdateTimeStamp Updating an entity updates the creation timestamp (and the update timestamp) Apr 8, 2025
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working quarkus The issue links an issue in Quarkus
Projects
None yet
2 participants