How do you execute native queries in hibernate
Anonymous
SQLQuery q= session.createSQLQuery(select I'd,name, salary from table); List res= q.list(); List listEmp; for(object[] obj: res) { Employee e= new Employee(); e.setId(Long.parseLong(obj[0].toString())); listEmp.add(e); }
Check out your Company Bowl for anonymous work chats.