Update child without deleting record using JPA

Asked

Viewed 43 times

1

I have an entity that has a list inside it. That list is the same type as her entity. Ex:

public class Aluno(){

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

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

I can’t use orphanRemoval = true because I can’t delete the father’s record, only remove the father-son bond.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.