develop #5

Merged
Petr merged 5 commits from develop into master 2025-02-20 07:49:29 +00:00
2 changed files with 7 additions and 6 deletions
Showing only changes of commit c76f57da93 - Show all commits

View File

@ -42,9 +42,10 @@ public class OfficeController {
return ResponseEntity.ok(officeService.update(officeId, officeDTO)); return ResponseEntity.ok(officeService.update(officeId, officeDTO));
} }
@DeleteMapping("/{officeId}") // Тут баг с ссылочной целостностью
public ResponseEntity<Void> deleteOffice(@PathVariable long officeId) { // @DeleteMapping("/{officeId}")
officeService.delete(officeId); // public ResponseEntity<Void> deleteOffice(@PathVariable long officeId) {
return ResponseEntity.noContent().build(); // officeService.delete(officeId);
} // return ResponseEntity.noContent().build();
// }
} }

View File

@ -39,7 +39,7 @@ public class Terminal {
private String code; private String code;
// todo: Протестировать нужен ли тут каскад тип // todo: Протестировать нужен ли тут каскад тип
@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "office_id", nullable = false) @JoinColumn(name = "office_id", nullable = false)
private Office office; private Office office;