Cannot set any value LocalDateTime in Entity of Spring Boot Example
I have a problem to set LocalDateTime.now to the entity of Spring Boot Example
Here is the entity shown below
Here is the method shown below
I get
null
value in checkIn
of savedPark
. I have to manually set the LocalDateTime.now() instead of using @Builder.Default
How can I do that?7 Replies
⌛
This post has been reserved for your question.
Hey @direct_x_34! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
I have also @PrePersist method in BaseEntity and I cannot use ParkEntity. I have also other entities extending from BaseEntity.
How can I do that? @*
I think Lombok's
@Builder.Default
is just for builders
Do what?
Also why did you ping the wildcard/top role?Why does everybody keep using lombok in entities...
Why does everybody keep using lombok and then not have Java work the same as it does with everyone
I mean, you can, but the blanket statements people add is just bad API design
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.