I\'m still not very clear about the way cascade works in deletion operations. I was wondering what happens if I have this:
class myBean{
@ManyToOne(fetc
Your JPA provider isn't going to manage your java collections in memory for you. If you have a relationship mapped in both sides, then one side should be defined as the owning side using the mappedBy attribute in the mapping of the non-owning side. It's up to you to decide which side is the owning side. Once you've made that decision, the JPA provider will keep things up to date in the database using whatever cascade/orphan management you've defined in the mapping but you are left to manage your collections in the non-owning side.
One way to manage this is to have a service method that is used to make the change and that service method takes care of updating the collection or the reference in your 1-n and n-1 side of things so your java objects are correct in memory.