Unknown entity: cn.jboa.bean.Email; nested exception is org.hibernate.MappingExc
public Boolean addEmail(Email email,List<Annex> l)
{
try {
Send send=(Send) this.getHibernateTemplate().load(Send.class, 2);
Read read=(Read) this.getHibernateTemplate().load(Read.class, 1);
Garbage garbage=(Garbage) this.getHibernateTemplate().load(Garbage.class, 1);
Employee employee=(Employee) this.getHibernateTemplate().load(Employee.class, 3);
System.out.println(employee.getNAME()+employee.getEmail());
email.setREAD_ID(read);
email.setSEND_ID(send);
email.setGARBAGE_ID(garbage);
email.setF_EMPLOYEE_ID(employee);
email.setS_EMPLOYEE_ID(employee);
String hql=" from Email e where e.ID=(select max(ID) from Email)";
this.getHibernateTemplate().save(email);
//addfujian(l,fusele(hql));
} catch (Exception e) {
System.out.println("impEmail新增错误:"+e.getMessage());
}
return true;
}