I am relatively new to Hibernate so I am still finding hard to understand a few concepts. And one of them is the owning.
I have a relationship between 2 objects.
Conversation
@OneToMany(mappedBy = "conversation", cascade = CascadeType.ALL)
private List<ConversationParticipant> participants;
ConversationParticipant
@ManyToOne
@JoinColumn(name = "ConversationID")
private Conversation conversation;
What I want to achieve is that when someone removes the participant from the list of the participants and update object conversation this casscades and removes the ConversationParticipant entry from the db.
Is my mapping wrong for this. The code runs find, it removes everything that it is suppose to and then it updates the Conversation object, however the participants are still there after refreshing the page.
Any ideas? Suggestions