2 u012555401 u012555401 于 2014.04.08 12:15 提问

hibernate注解实体类生成不了数据表

用的是packagesToScan
package cn.bdqn.oa.model;

import java.sql.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="t_evection")
@SequenceGenerator(name="evec_seq",sequenceName="evec_seq")
public class Evection {
private Long id;
@ManyToOne
private User user1;//申请人
private String eveStatus;//状态
private Date startTime;//开始时间
private Date endTime;//结束时间
private String destination;//目的地
private String eveDesc;//出差描述
@ManyToOne
private User user2;//处理人
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="evec_seq")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
下面是别的属性的getter,setter
}
tomcat不报错

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!