I have a bi-directional many-to-many class:
public class A{ @ManyToMany(mappedBy="listA") private List<B> listB; } public class B{ @ManyToMany private List<A> listA; }
Now I save listA to B:
b.setListA(listA);
All this works fine until I turn on second-level caching in the a.ListB collection. Now when I update the list in B, a.listB is not updated and remains obsolete.
How do you get around this?
Thanks Dwayne
source share