fix: Circular inclusion
parent
10b2b6d161
commit
0706bd294a
|
@ -2,6 +2,7 @@ package com.maradona.backend.entities;
|
|||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -10,7 +11,6 @@ import java.util.stream.Collectors;
|
|||
@Entity
|
||||
@Data
|
||||
public class Employee {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
@ -31,6 +31,7 @@ public class Employee {
|
|||
private LocalTime dEnd;
|
||||
|
||||
@OneToMany(mappedBy = "employee", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@JsonManagedReference
|
||||
private List<EmployeeSecondarySkill> secondarySkills;
|
||||
|
||||
public void setEmployeeNr(Integer employeeNr) {
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package com.maradona.backend.entities;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class EmployeeSecondarySkill {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
@ -19,7 +18,6 @@ public class EmployeeSecondarySkill {
|
|||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "secondary_skill_id", nullable = false)
|
||||
@JsonBackReference
|
||||
private SecondarySkill secondarySkill;
|
||||
|
||||
@Column(nullable = false)
|
||||
|
|
Loading…
Reference in New Issue