save
This commit is contained in:
parent
9ffcbf46b1
commit
bfd9a5782a
BIN
data.mv.db
BIN
data.mv.db
Binary file not shown.
@ -18,7 +18,7 @@ public class Reader {
|
||||
@Column
|
||||
private String hashedPassword;
|
||||
|
||||
@ManyToMany(fetch = FetchType.EAGER)
|
||||
@ManyToMany(fetch = FetchType.EAGER, cascade = CascadeType.MERGE)
|
||||
private List<Manga> mangas;
|
||||
|
||||
public Reader() {
|
||||
|
@ -92,9 +92,9 @@ public class MangaService {
|
||||
public Manga deleteManga(Long id) {
|
||||
final Manga currentManga = findManga(id);
|
||||
final List<Reader> listReader = readerService.findAllReaders();
|
||||
for (Reader reader : listReader){
|
||||
/* for (Reader reader : listReader){
|
||||
reader.getMangas().remove(currentManga);
|
||||
}
|
||||
}*/
|
||||
mangaRepository.delete(currentManga);
|
||||
return currentManga;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user