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
    @Getter
    @Setter
    @EqualsAndHashCode(callSuper = true)
    @SuperBuilder
    @NoArgsConstructor
    @AllArgsConstructor
    @Entity
    @Table(name = "PARK")
    public class ParkEntity extends BaseEntity {
    
       ...
    
       @Column(name = "CHECK_IN")
       private LocalDateTime checkIn;
    
    
       ....
    }

Here is the method shown below
    private Park parkMethod(....) {
            ParkEntity parkEntity = ....
            parkEntity.setCheckIn(LocalDateTime.now());
            ParkEntity savedPark = parkRepository.save(parkEntity);
            return parkEntityToParkMapper.map(savedPark);
    }


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?
Was this page helpful?