title: hibernate nativesql select not working. it is returning empty objects
body: <p>I wrote a small program to get the list of things from Database by using Hibernate native sql. I am getting blank objects from Data Base.</p>
  
  <pre><code>Configuration conf = new Configuration();
  
                  //2 Loading hibernate configuration file
                  conf.configure("hibernate.cfg.xml");
  
                  SessionFactory factory = conf.buildSessionFactory();
  
                  Session session = factory.openSession();
  
                  SQLQuery qq = session.createSQLQuery("SELECT Employee_Name, EMployee_id, Address FROM employee");
                  List&lt;Object[]&gt; l = qq.list();
                  System.out.println(":::::::::::::::::::::"+l.size());
                  Iterator itr = l.iterator();
                  while(itr.hasNext()) {
                      Object[] objs = (Object[])itr.next();
                      System.out.println(objs[0].toString());
                  }
  </code></pre>
  
  <p>the size of the list is same as the size of the databse. But the obj is coming as blank and when i tried printing values it is giving outofbound exception</p>
  
  <p><a href="http://i.stack.imgur.com/uvKGP.png" rel="nofollow">enter image description here</a></p>