title: How to obtain hibernate generated sql without aliases
body: <p>I'm working on a function that with a given criteria, returns it's sql, but i getting sql with criteria aliases.
  So, are there any way to keep the original column names from database, instead of replacing with alias?</p>
  
  <p>The function:</p>
  
  <pre class="lang-java prettyprint-override"><code>    public String getReportSQL(Criteria criteria) {
          try {
              CriteriaImpl c = (CriteriaImpl) criteria;
              SessionImpl s = (SessionImpl)c.getSession();
              SessionFactoryImplementor factory = (SessionFactoryImplementor)s.getSessionFactory();
              String[] implementors = factory.getImplementors( c.getEntityOrClassName() );
              CriteriaLoader loader = new CriteriaLoader((OuterJoinLoadable)factory.getEntityPersister(implementors[0]),
                      factory, c, implementors[0], s.getLoadQueryInfluencers());
  
              Field f = OuterJoinLoader.class.getDeclaredField("sql");
              f.setAccessible(true);
              return (String) f.get(loader);
         } catch(Exception e){
             throw new RuntimeException(e);
         }
      }
  </code></pre>
  
  <p>Got:</p>
  
  <pre class="lang-sql prettyprint-override"><code>    select this_.CAR_KEY as CAR_11_0_ from DATABASE.CAR this_
  </code></pre>
  
  <p>Expected:</p>
  
  <pre class="lang-sql prettyprint-override"><code>    select CAR_KEY from DATABASE.CAR
  </code></pre>
  
  <p>Thanks in advance</p>