UnsupportedOperationException merge-saving many-to-many relation with hibernate and JPA
问题 I've set up a simple many-to-many relationship account : role with Hibernate but when I try to save an account in a unit test after it has had its role added I get an UnsupportedOperationException: java.lang.UnsupportedOperationException at java.util.AbstractList.remove(AbstractList.java:144) at java.util.AbstractList$Itr.remove(AbstractList.java:360) at java.util.AbstractList.removeRange(AbstractList.java:559) at java.util.AbstractList.clear(AbstractList.java:217) at org.hibernate.type