Update child without deleting record using JPA

1

I have an entity that has a list inside it. This list is of the same type as its entity. Ex:

public class Aluno(){

   List<Pessoa> responsaveis = CollectionsBuilder.createDefaultArrayList();
}

When updating the student, removing a responsible one, using the CascadeType.ALL notation, it does not update the responsible one, that is, it does not remove the student reference.

I can not use orphanRemoval = true because I can not delete the parent record, only remove the parent-child link.

    
asked by anonymous 26.06.2018 / 15:31

0 answers