@Entity
public class TestClass implements Serializable{
private Integer id;
private Set<String> mySet;
@Id
@GeneratedValue
public Integer getId() {
return id;
}
@OneToMany(cascade={CascadeType.ALL})
public Set<String> getMySet() {
return mySet;
}
}
Je reçois l'erreur suivante.
Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: TestClass.mySet[java.lang.String]
ou si je laisse de côté le @OneToMany
org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: test_class, for columns: [org.hibernate.mapping.Column(my_sets)
]