在我的 Java 应用程序中创建具有一个字段的值对象(Java Bean)
@Entity
@Table(name="EC_TIMETABLE")
public class TimetableVO
{
----//@id and some other column and variables
----
private List<WeekdayType> repeatDays;//Their is No column in Database
------
------//setter and getter method
}
听说 WeekdayType 是 Enum 类
public static enum WeekdayType {
MONDAY(Calendar.MONDAY), TUESDAY(Calendar.TUESDAY), WEDNESDAY(
Calendar.WEDNESDAY), THURSDAY(Calendar.THURSDAY), FRIDAY(
Calendar.FRIDAY), SATURDAY(Calendar.SATURDAY), SUNDAY(
Calendar.SUNDAY);
private int day;
private WeekdayType(int day) {
this.day = day;
}
我正在使用 TimetableVO getRepeatedDays() 另一个类。
当我启动服务器时出现错误
org.hibernate.MappingException: Could not determine type for: java.util.List, at table: EC_TIMETABLE, for columns: [org.hibernate.mapping.Column(repeatDays)]
他们在数据库或语法问题中需要的任何列也是如此.....提前谢谢..