HHH-5940 Add tests for @MapKeyJoinColumns

This commit is contained in:
Emmanuel Bernard 2011-03-14 17:32:13 +01:00
parent 72ef0fd492
commit 9a2494b13f
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import javax.persistence.JoinColumn;
import javax.persistence.MapKeyColumn;
import javax.persistence.MapKeyEnumerated;
import javax.persistence.MapKeyJoinColumn;
import javax.persistence.MapKeyJoinColumns;
import javax.persistence.MapKeyTemporal;
import javax.persistence.TemporalType;
@ -59,7 +60,7 @@ public class Atmosphere {
@CollectionOfElements //TODO migrate to @ElementCollection ; @MapKeyManyToMany ??
@Column(name="composition_rate")
@MapKeyJoinColumn(name="gas_id" )
@MapKeyJoinColumns( { @MapKeyJoinColumn(name="gas_id" ) } ) //use @MapKeyJoinColumns explicitly for tests
@JoinTable(name = "Composition", joinColumns = @JoinColumn(name = "atmosphere_id"))
public Map<Gas, Double> composition = new HashMap<Gas, Double>();