третья попытка((((
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user