fix: updating foreign keys when adding new entity to the db
All checks were successful
Format / formatting (push) Successful in 7s
Build / build (push) Successful in 31s
CI / build (push) Successful in 11s

This commit is contained in:
Théo Le Lez
2025-03-15 15:23:18 +01:00
parent d5c89bf8f4
commit c94d3654ce
10 changed files with 206 additions and 18 deletions

View File

@ -107,7 +107,20 @@ public class EntrepreneurApiService {
mail,
sectionCell.getIdSectionCell(),
this.sectionCellService.getProjectId(sectionCell.getIdSectionCell()));
sectionCellService.addNewSectionCell(sectionCell);
SectionCell newSectionCell = sectionCellService.addNewSectionCell(sectionCell);
newSectionCell.getProjectSectionCell().updateListSectionCell(newSectionCell);
newSectionCell
.getAppointmentSectionCell()
.forEach(
appointment -> {
appointment.updateListSectionCell(newSectionCell);
});
newSectionCell
.getListAnnotation()
.forEach(
annotation -> {
annotation.setSectionCellAnnotation(newSectionCell);
});
}
public void requestNewProject(Project project, String mail) {