The List
is org.hibernate.collection.PersistentBag
...
and i want to delete this Mylist...
H
Try deleting elements one by one:
List<String> Mylist = a.getMyList();
em.getTransaction().begin();
for (String element:Mylist){
em.remove(element);
}
em.getTransaction().commit();
_______________________
The Solution (Work to me, thank to "Genzotto"):
List<String> Mylist = a.getMyList();
listStirng.clear();
em.getTransaction().begin();
for (String str : Mylist) {
em.merge(str);
}
em.getTransaction().commit();