Java Hibernate Mapping Exception! (Could not determine type for: java.util.Map)

前端 未结 5 1150
[愿得一人]
[愿得一人] 2021-01-18 14:00

I have made a class with name of Movie with folowing fields:

    @Id
@GeneratedValue
private Long id;
private String name;
@ElementCollection(targetClass = S         


        
5条回答
  •  无人共我
    2021-01-18 14:42

    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();
    

提交回复
热议问题