ssh框架中的多表连接查询,求救~~~
ssh框架的项目,要查询两个表的字段,并且两个表没有主外健关系
我的sql语句
String sql = "select d.control_Point,c.hosp_name from Db_View_Point d , Db_Hosp_Info c where d.hosp_id = c.hosp_id and c.hosp_Id = 'sf' and d.equip_Id = '90' and d.hand_Flag = 1"//查询List list = session.createSQLQuery(hql). addEntity("d",DbViewPoint.class). addEntity("c", DbHospInfo.class).list()//两个实体类 DbViewPoint DbHospInfo//新增的一个辅助类 PointEquipFrom