I have 3 POJOs:
Code:
@Configurable
@XStreamAlias("Employer")
@Entity
public class Employer {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private Dept dept;
// getter, setter
}
@Configurable
@XStreamAlias("Dept")
@Entity
public class Dept {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
...........
@Embedded
private List<Employee> empList = new ArrayList<Employee>();
// getter, setter
............
}
@Configurable
@XStreamAlias("Employee")
@Embeddable
@Entity
public class Employee {
..................
}
I am getting this exception:
"Could not determine type for: com.demo.domain.Dept, at table: EMPLOYER, for columns: [org.hibernate.mapping.Column(dept)]...."Will Hibernate map/serialize/deserialize the nested classes for me correctly just by doing above in the POJOs? Do I need any special mapping in xml files? Or are theret something else missing?
Any info will be greatly appreciated.