title: Hibernate cannot make distinction between columns with the same name
body: <p>I have a table called cinema with a column ipaddress.</p>
  
  <p>I have a table called tms with a column ipaddress.</p>
  
  <p>When I perform the query specified below, the t.ipaddress returns the value of c.ipaddress. What do I have to do to solve this problem?</p>
  
  <pre><code>        sqlStatement1 = 
                    "select c.IpAddress,        "
                  + "       c.User,             "
                  + "       c.Password,         "
                  + "       c.connectionType,   "
                  + "       c.NominalBandwidth, "
                  + "       t.ipaddress ,       "
                  + "       t.user,             "
                  + "       t.password,         "
                  + "       t.direction,        "
                  + "       t.ftp_script,       "
                  + "       t.bandwidth,        "
                  + "       t.tmsId,             " 
                  + "       d.assetFilePath,     " 
                  + "       bt.status     "
                  + "from   "
                  + ConfigurationParametersHelper.getInstance()
                          .getConfValidated("DBASE_SCHEMA")
                  + ".booking b,     "
                  + "       "
                  + ConfigurationParametersHelper.getInstance()
                          .getConfValidated("DBASE_SCHEMA")
                  + ".bookingtms bt, "
                  + "       "
                  + ConfigurationParametersHelper.getInstance()
                          .getConfValidated("DBASE_SCHEMA")
                  + ".dcp d,         "
                  + "       "
                  + ConfigurationParametersHelper.getInstance()
                          .getConfValidated("DBASE_SCHEMA")
                  + ".cinema c,      "
                  + "       "
                  + ConfigurationParametersHelper.getInstance()
                          .getConfValidated("DBASE_SCHEMA")
                  + ".tms t          "
                  + "where  b.IdKey          = "
                  + booking.getIdKey()
                  + " "
                  + "and    bt.booking_IdKey = b.IdKey "
                  + "and    b.dcp_id         = d.id "
                  + "and    c.Id             = b.cinema_Id "
                  + "and    t.cinema_id      = c.Id "
                  + "and    t.tmsid          = bt.tms_tmsid "
                  + "order  by bt.id asc";
  </code></pre>
  
  <p>UPDATE1: if I specify t.ipaddress before c.ipaddress in the query, c.ipaddress gets overwritten by the t.ipaddress and vice versa.</p>