这个错误org.hibernate.MappingException: Unknown entity: cn.com.sgcc.iss.model.TempAt
我用的注解的方式,为什么还报错。。和配置文件有关系吗?
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name="iss_tmp_attackqs_com")
@SequenceGenerator(name="seq_tmp_attackqs_com",sequenceName="seq_tmp_attackqs_com",allocationSize=1)
public class TempAttackTide {
/**
* @ID
*/
private int id;
/**
* @指标一级分类
*/
private String onetype;
/**
* @指标二级分类
*/
private String twotype;
/**
* @组织机构id
*/
private int orgId;
/**
* @指标名称
*/
private String name;
/**
* @指标值value
*/
private String value;
/**
* @更新时间
*/
private Date occurTime;
public int getId() {
return id;
}
@Id
@GeneratedValue(generator="seq_tmp_attackqs_com",strategy = GenerationType.SEQUENCE)
public void setId(int id) {
this.id = id;
}
public String getOnetype() {
return onetype;
}
public void setOnetype(String onetype) {
this.onetype = onetype;
}
public String getTwotype() {
return twotype;
}
public void setTwotype(String twotype) {
this.twotype = twotype;
}
public int getOrgId() {
return orgId;
}
public void setOrgId(int orgId) {
this.orgId = orgId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public Date getOccurTime() {
return occurTime;
}
public void setOccurTime(Date occurTime) {
this.occurTime = occurTime;
}