Community
Participate
Working Groups
Build Identifier: EclipseLink 2.2.0 (JDK 1.6.24) An Entity Class has the following property defined ... @OneToMany @JoinTable(name="DETAILS", joinColumns= @JoinColumn(name="DEC_ID"), inverseJoinColumns=@JoinColumn(name="CONN_ID")) @MapKeyColumn(name="CHOICEID", length=25) Map<String, DetailObject> connections = new HashMap<String, DetailObject>(); ... NOTE: Unidirectional mapping... there is not a ManyToOne property defined in DetailObject entity The TABLE get created correctly, but only the DEC_ID and CONN_ID columns ever get filled with data... I checked did some trouble shooting and the database update only includes the joinColumns ignoring the MapKeyColumn (The HashMaps key) like so: --- INSERT INTO DETAILS (DEC_ID, CONN_ID) VALUES (?, ?) --- I reconfigured the project to use OpenJPA, just for a comparative test, and it was updating the value correctly using HashMap property configured as above. Reproducible: Always Steps to Reproduce: 1. Create an EntityA with a @OneToMany HashMap Property with <String, EntityB> 2. Fill the HashMap in EnityA with the <String, EntityB> 3. Persist the EntityA, only the two joinColumns are updated in the database.
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
This is still present in 2.5.0 using glassfish 4, JavaSE and Derby DB.
Adding a note to say that I stumbled across the very same issue by specifying a many-to-many annotation in my case. I am using the EclipseLink version that comes bundled with the latest version of Glassfish.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink