I have made a class with name of Movie with folowing fields:
@Id @GeneratedValue private Long id; private String name; @ElementCollection(targetClass = S
I also face the same problem.It is late but i think it will help others.use @MapKeyColumn.here is my simple code
@ElementCollection(targetClass=String.class) @MapKeyColumn(name="Employee_Position") private Map position=new HashMap();