Код: Выделить всё
public class Famille {
@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@Column(length = 30, nullable = false)
private String nom;
@Column(length = 12, nullable = false)
private String branche;
@OneToMany(mappedBy = "famille")
private List fiches;
@CreationTimestamp
private LocalDateTime dateCreation;
}
Код: Выделить всё
public class Fiche {
@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@Column(nullable = false)
private String titre;
@ManyToOne
private Famille famille;
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "fiche")
private IncidentSecurite incidentSecurite;
@Column(nullable = false, columnDefinition = "TEXT")
private String nomFichesReferences;
@Column(nullable = false, columnDefinition = "TEXT")
private String presentationGeneral;
@CreationTimestamp
private LocalDateTime dateCreation;
}
и получить «фамилии» каждой фиши, когда я получаю фиши?< /п>
Подробнее здесь: https://stackoverflow.com/questions/787 ... inite-loop