title: Hibernate HQL Alias Issue
body: <pre>
  MainTable.java extends Common.java
  
  private Long id ;
  private Long version ; 
  private String name ;
  private SubTable sub ;
  
  
  SubTable.java extends Common.java
  
  private String subname ;
  prviate String dualname ; 
  
  
  Common.java
  
  private Long id ;
  prviate Date createDate ;
  
  
  HQL
  v
  String sql = "update MainTable set name = ?  where sub.id = ? and version = ?" ; 
  Query query = session..createQuery(sql);
  // set paramerts
  query.executeUpdate();
  
  </pre>
  
  <p>Hibernate Generated SQL</p>
  
  <p>update MainTable set name =? where templateve0_.SUB_ID=? and version =?</p>
  
  <p>Error</p>
  
  <p>ERROR org.hibernate.util.JDBCExceptionReporter  - ORA-00904: "TEMPLATEVE0_"."SUB_ID": invalid identifier</p>
  
  <p>FYI - SUB_ID is a valid column name.</p>
  
  <p>I am not sure why is hibernate adding templateve0_ alias only for the sub-object. Any help?</p>