Community
Participate
Working Groups
ElementCollection Map of basic values keyed by entity. Updating a value of a Map entry seems to be causing EL to remove the old row in the collection table and insert a new one with the new value instead of updating it in the collection table. Example of model: @Entity public class Department { @Id private int id; @ElementCollection @CollectionTable(name="EMP_SENIORITY") @MapKeyJoinColumn(name="EMP_ID") @Column(name="SENIORITY") private Map<Employee, Integer> seniorities; ... } Code example: myDept.getSeniorities().put(newEmp, 1); ... myDept.getSeniorities().put(newEmp, 2); When modifying the value, the second put() will cause the row in EMP_SENIORITY table to be removed and a new one to be inserted in the collection table. Bug 364248 reports two problems. First one has been fixed. However, the other is a performance enhancement.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink