You should add @hibernate mappings in the component class, e.g:
Code:
import java.sql.Timestamp;
public class DateRange {
private Timestamp startDate;
private Timestamp endDate;
/**
* @hibernate.property
*/
public Timestamp getEndDate() {
return endDate;
}
public void setEndDate(Timestamp endDate) {
this.endDate = endDate;
}
/**
* @hibernate.property
*/
public Timestamp getStartDate() {
return startDate;
}
public void setStartDate(Timestamp startDate) {
this.startDate = startDate;
}
}
That's what I do and it works.