Hi there, I am using a condition in where clause I am gettinng 4 records size is showing correct but data is showing same for all 4 records.
System.out.println("Retrieving Record"); TblStratificationValue stratvalue = new TblStratificationValue(); org.hibernate.Query query = session.createQuery("from TblStratificationValue where StratificationTypeId =4"); // org.hibernate.Query query = session.createQuery("from TblStratificationValue"); // System.out.println("StratificationTypeID--------------------------"+this.StratificationTypeId); // query.setString("stratId",this.StratificationTypeId); // query.setString("stratId","3"); System.out.println("Query^^^^^^^^"+query.getQueryString()); System.out.println("Query Size"+ query.list().size()); list = (ArrayList) query.list(); //Order o=(Order)list.iterator.next(); Iterator i = list.iterator(); while(i.hasNext()) { System.out.println("%9999999****************************************************************######"); stratvalue = (TblStratificationValue)i.next(); System.out.println("stratvalue = "+stratvalue); list.add(stratvalue);//.getStatusId(),status.getStatus()); System.out.println("getStratificationValueId():-"+stratvalue.getStratificationValueId()); System.out.println("getStratificationValueId():-"+stratvalue.getName()); System.out.println("size%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%:-"+list.size()); } session.getTransaction(); this is my code please give me a hint why is it showing same values for name and values. Thanks
|