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

persistAndFlush with @CreationTimeStamp and @UpdateTimeStamp #2138

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

persistAndFlush with @CreationTimeStamp and @UpdateTimeStamp #2138

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant