JPA Mapping Of A HashMap Having A Enum Key
Join the DZone community and get the full member experience.
Join For Free
@ElementCollection
@CollectionTable(name="table_name", joinColumns=@JoinColumn(name="owner_fk"))
@MapKeyColumn(name = "name", length = 50, nullable = false)
@MapKeyEnumerated(EnumType.STRING)
@Column(name = "value", length = 100)
private final Map metadata = new HashMap();
Data structure
Opinions expressed by DZone contributors are their own.
Comments