@Entity
@Table( name = "map_container_entity" )
public static class MapContainerEntity {
@Id
private Long id;
@OneToMany(mappedBy = "container")
private Map<MapKeyEntity, MapValueEntity> map;
}
@Entity
@Table( name = "map_key_entity" )
public static class MapKeyEntity {
@Id
private Long id;
}
@Entity
@Table( name = "map_value_entity" )
public static class MapValueEntity {
@Id
private Long id;
@ManyToOne
private MapContainerEntity container;
}