Hello,
We have an issue with a list as a value in a hashmap.
Within one transaction a new key-value pair is added to an existing hashmap. The key is a String, while the value is an ArrayList. During the same large transaction three elements are added to the list step by step, with many other db operations being performed in between.
Once the transaction is committed, the issue is that the last element in the list is not persisted and cannot be retrieved in another transaction. The last element is missed in the list.
Do you have an idea why?
@Entity @Access (AccessType.FIELD) public class MappingImpl implements Mapping { //the UID of the Mapping @Id @Access (AccessType.FIELD) @Column (name = "uid") private String uid; @OneToOne (fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH, CascadeType.DETACH }) private ModelElementImpl element; @OneToMany (fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH, CascadeType.DETACH }) private HashMap<String, List<ModelElementImpl>> mappingMap = new HashMap<>(1); (edited)