做ssh整合时,用hibernate映射一张表怎么对另外一张表进行操作?
假设现在有两张表,stu表和tea表
在做ssh整合的时候 映射的是stu这张表,然而在数据访问层(StuDAO)中有一个方法需要操作另外一张表,
比如:public void del(int id) {
         Session session=null;
try {
String hql="delete from tea where id="+id;
session=this.getSession();
Query query = session.createQuery(hql);

query.executeUpdate();

} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
当创建一个StuDAO对象,使用这个方法时报错:Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: tea is not mapped [delete from tea where id=1]查看下配置文件是没有对tea这张表映射,操作当然不能完成。 
请问大家做ssh整合时,用hibernate映射一张表怎么对另外一张表进行操作,难道真的要对每一个表都映射吗?
在做项目时有的表不想对它映射,但又想对它进行操作,请问怎么实现?