третья попытка((((

This commit is contained in:
2025-11-29 20:11:44 +03:00
parent 0fc0678392
commit c4afce7fa6
5 changed files with 19 additions and 47 deletions

View File

@@ -1,10 +1,12 @@
package com.example.nto.entity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.persistence.*;
import java.time.LocalDate;
@Entity
@Table(name = "booking")
@JsonIgnoreProperties({"hibernateLazyInitializer"})
public class Booking {
@Id
@@ -13,11 +15,11 @@ public class Booking {
private LocalDate date;
@ManyToOne(fetch = FetchType.LAZY)
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "place_id")
private Place place;
@ManyToOne(fetch = FetchType.LAZY)
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "employee_id")
private Employee employee;
@@ -31,13 +33,10 @@ public class Booking {
public long getId() { return id; }
public void setId(long id) { this.id = id; }
public LocalDate getDate() { return date; }
public void setDate(LocalDate date) { this.date = date; }
public Place getPlace() { return place; }
public void setPlace(Place place) { this.place = place; }
public Employee getEmployee() { return employee; }
public void setEmployee(Employee employee) { this.employee = employee; }
}