develop #5
@ -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();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user