我有豆作为:
public class ReminderHeader implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", unique = true, nullable = false)
@Basic(fetch = FetchType.EAGER)
private long id;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "FromDateTime", nullable = false)
private Date fromDateTime;
}
我想在fromDateTime =特定日期
时选择所有内容我用:
Criteria c = getCurrentSession().createCriteria(ReminderHeader.class);
c.add(Restrictions.eq("fromDateTime", new Date())).list();
并给我例外 我如何从日期表中选择数据?