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

@DateCreated/@DateUpdated don't work when used in @ Embeddable #3155

Open
Nahuel92 opened this issue Sep 30, 2024 · 0 comments
Open

@DateCreated/@DateUpdated don't work when used in @ Embeddable #3155

Nahuel92 opened this issue Sep 30, 2024 · 0 comments

Comments

@Nahuel92
Copy link

Nahuel92 commented Sep 30, 2024

Note

I left a whitespace between @ and Embeddable on purpose, as someone has taken it as their GitHub username

Expected Behavior

@DateCreated and @DateUpdated should work (that is, populate a value) when defined as part of an @ Embeddable that is used by an entity

Actual Behaviour

@DateCreated and @DateUpdated don't populate values when defined as part of an @ Embeddable that is used by an entity

Steps To Reproduce

Please see the provided example application, but if you don't want to use it, here are the steps:

  1. Create a @ Embeddable with at least a field annotated with @DateCreated
  2. Create an entity using previous @ Embeddabble
  3. Create an entity instance and save it. If the DB has a NOT NULL constraint on the column that should be populated via @DateCreated, it will fail.

Environment Information

  • OS: Any
  • Java: 21

Example Application

https://github.com/Nahuel92/datecreated-dateupdated-bug

Version

4.6.2

@Nahuel92 Nahuel92 changed the title @DateCreated/@DateUpdated don't work when used in @Embeddable @DateCreated/@DateUpdated don't work when used in @ Embeddable Sep 30, 2024
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

No branches or pull requests

1 participant