I have made a class with name of Movie with folowing fields:
@Id
@GeneratedValue
private Long id;
private String name;
@ElementCollection(targetClass = S
Aah I see, its a . I dont think you can map a primitive unless you are using latest jar. https://forum.hibernate.org/viewtopic.php?t=955308. Check that link. Could you make a class called as Properties with key and value and then use it? I had a similar problem and I had to use that approach.
Shouldn't properties just be a List<String>
type?
It sounds like Hibernates confusion is the same as mine which is, why is Properies a Map instead of a list? What exactly are you trying to do there?
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<String,String> position=new HashMap<String,String>();
Do you have both getter and setter for Properties?
that's because you have to use some jpa2 implementation! this guy had the same problem