fix: add @JsonIgnore to Piloto and Escuderia to prevent circular refs
This commit is contained in:
parent
fa8a2f5451
commit
3c6b5f7355
|
|
@ -2,6 +2,7 @@ package es.tatvil.formula1.model;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
|
||||
|
|
@ -21,6 +22,7 @@ public class Escuderia {
|
|||
private String pais;
|
||||
private String motor;
|
||||
|
||||
@JsonIgnore
|
||||
@OneToMany(mappedBy = "escuderia")
|
||||
private List<PilotoEscuderia> pilotosEscuderia;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package es.tatvil.formula1.model;
|
|||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -28,6 +28,7 @@ public class Piloto {
|
|||
private Integer numero;
|
||||
private String codigo;
|
||||
|
||||
@JsonIgnore
|
||||
@OneToMany(mappedBy = "piloto")
|
||||
private List<PilotoEscuderia> pilotosEscuderia;
|
||||
}
|
||||
Loading…
Reference in New Issue