Hi there, I am trying to get data from multiple tabels so i am using join. Please let me know the problem here. TblMeasureBean a = new TblMeasureBean(); TblContentAreaBean c = new TblContentAreaBean(); TblIndicatorBean b = new TblIndicatorBean(); TblContentAreaIndicatorBean e =new TblContentAreaIndicatorBean(); TblIndicatorMeasureBean d = new TblIndicatorMeasureBean(); System.out.println("Retrieving Record"); // TblCalculation calculation = new TblCalculation(); String hql = "select a.measureId, a.name, b.name,c.name from TblMeasureBean as a, TblIndicatorBean as b, TblContentAreaBean as c, TblIndicatorMeasureBean as d, TblContentAreaIndicatorBean as e where a.measureId = d.measureId and d.indicatorId = b.indicatorId and d.indicatorId = e.indicatorId and e.contentAreaId = c.contentAreaId"; //List list = session.createQuery("from TblCalculation").list(); org.hibernate.Query query = session.createQuery(hql); session.getTransaction(); this sis the output I am getting from hibernate
select tblmeasure0_.MeasureId as col_0_0_, tblmeasure0_.Name as col_1_0_, tblindicat1_.NAME as col_2_0_, tblcontent2_.NAME as col_3_0_ from EPHTN2.dbo.tblMeasure tblmeasure0_ cross join TBLINDICATORBEAN tblindicat1_ cross join TBLCONTENTAREABEAN tblcontent2_ cross join TBLINDICATORMEASUREBEAN tblindicat3_ cross join TBLCONTENTAREAINDICATORBEAN tblcontent4_ where tblmeasure0_.MeasureId=tblindicat3_.MEASUREID and tblindicat3_.INDICATORID=tblindicat1_.INDICATORID and tblindicat3_.INDICATORID=tblcontent4_.INDICATORID and tblcontent4_.CONTENTAREAID=tblcontent2_.CONTENTAREAID could not execute query flush done
|