1st without errors

This commit is contained in:
lynxwq2
2025-12-03 19:02:59 +03:00
parent 7087390b38
commit 6703a935bb
8 changed files with 54 additions and 25 deletions

View File

@@ -1,5 +1,7 @@
package com.example.nto.entity;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -31,7 +33,8 @@ public class Booking {
@JoinColumn(name = "place_id")
private Place place;
@ManyToOne(targetEntity = Employee.class, fetch = FetchType.LAZY)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "employee_id")
@JsonBackReference
private Employee employee;
}