
Hello sir, I am using @ElementCollection annotaion in my entity class as
@Entity
@Table(name="stud_collection")
public class StudentEntity implements Serializable{
@Id
@Column(name="id")
private Long id;
@Column(name="sname")
private String sname;
@Column(name="sage")
private Long sage;
@Column(name="friends")
@ElementCollection
private java.util.List friends;
//setters and getters;
but when i run it, it throws exception as:
Exception in thread "main" org.hibernate.MappingException: Could not determine type for: java.util.List, at table: stud_collection, for columns: [org.hibernate.mapping.Column(friends)]
so how to handle this exception again what jars i need and what to do at the time of adding hibernate capabilities in MyEclipse.thanks...
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.