orphanRemoval не работает для ManyToMany
This commit is contained in:
parent
c3ebc3dbf6
commit
e7fc79a52b
@ -1,6 +1,7 @@
|
||||
package com.LabWork.app.MangaStore.model.Default;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import org.hibernate.annotations.Cascade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -19,6 +20,8 @@ public class Reader {
|
||||
private String hashedPassword;
|
||||
|
||||
@ManyToMany(fetch = FetchType.EAGER, cascade = CascadeType.MERGE)
|
||||
/*@Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN)*/
|
||||
/*orphanRemoval=true*/
|
||||
private List<Manga> mangas;
|
||||
|
||||
public Reader() {
|
||||
|
Loading…
Reference in New Issue
Block a user