Ignore:
Timestamp:
05/06/25 00:44:02 (13 days ago)
Author:
Aleksandar Panovski <apano77@…>
Branches:
main
Children:
e48199a
Parents:
142c0f8
Message:

Normalization needed to continue, till here done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java

    r142c0f8 rb67dfd3  
    4848
    4949    @Column(name = "Status", length = 20, nullable = false)
    50     private String status;
     50    private String reservationStatus;
    5151
    5252    @Column(name = "CheckInTime")
     
    5757    private LocalDateTime checkOutTime;
    5858
    59 //    @ElementCollection
    60 //    @CollectionTable(name = "reservation_preordered_items", joinColumns = @JoinColumn(name = "reservation_id"))
    61 //    @Column(name = "item")
    62 //    private List<String> preOrderedItems = new ArrayList<>();
    63     @OneToMany(mappedBy = "reservation", cascade = CascadeType.ALL, orphanRemoval = true)
     59    @OneToMany(mappedBy = "reservation", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
    6460    private List<PreorderedItem> preOrderedItems = new ArrayList<>();
    6561
     
    7369    @PrePersist
    7470    private void prePersist() {
    75         if (status == null) {
    76             status = "Pending";
     71        if (reservationStatus == null) {
     72            reservationStatus = "Pending";
    7773        }
    7874        if (paymentStatus == null) {
     
    8884        this.partySize = partySize;
    8985        this.specialRequests = specialRequests;
    90         this.status = status;
     86        this.reservationStatus = status;
    9187        this.checkInTime = checkInTime;
    9288        this.checkOutTime = checkOutTime;
     
    105101                ", partySize=" + partySize +
    106102                ", specialRequests='" + specialRequests + '\'' +
    107                 ", status='" + status + '\'' +
     103                ", status='" + reservationStatus + '\'' +
    108104                ", checkInTime=" + checkInTime +
    109105                ", checkOutTime=" + checkOutTime +
Note: See TracChangeset for help on using the changeset viewer.