title: Hibernate Select wrong table name
body: <p>Im trying to insert and select data in mysql database trough Hibernate and Insert is working fine for me but select somehow dont map the right table name and returns me no result.</p>
  
  <p>Get and insert code:</p>
  
  <pre><code>    SessionFactory sessFact = HibernateUtil.getSessionFactory();
      Session session = sessFact.getCurrentSession();
      session.beginTransaction();
  
      session.save(obj);
      session.getTransaction().commit();
  
      try {
          Session mysession = HibernateUtil.getSessionFactory().getCurrentSession();
          mysession.beginTransaction();
          weatherDataObject resultObjectHib = (weatherDataObject) mysession.get(weatherDataObject.class, 26);
          mysession.getTransaction().commit();
      } catch (Exception e) {
          e.printStackTrace();
      }
      sessFact.close();
  
  
  
  &lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC
          "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
          "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"&gt;
  &lt;hibernate-mapping package="some.pack"&gt;
      &lt;class name="weatherCoordinates" table="coordinates"&gt;
          &lt;id name="dataBaseId" column="coordinates_id"&gt;
              &lt;generator class="native" /&gt;
          &lt;/id&gt;
          &lt;property name="lat" type="string" column="coordinates_lat" /&gt;
          &lt;property name="lon" type="string" column="coordinates_lon" /&gt;
  
  
  
  
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  
  
  
  
  &lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC
          "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
          "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"&gt;
  &lt;hibernate-mapping package="some.pack"&gt;
      &lt;class name="weatherDataObject" table="data_object"&gt;
          &lt;id name="id" column="data_object_id"&gt;
              &lt;generator class="native" /&gt;
          &lt;/id&gt;
          &lt;property name="name" type="string" column="data_object_name" /&gt;
          &lt;many-to-one name="coord" class="task.main.DataObjects.weatherCoordinates"
              column="coordinates_id" unique="true" not-null="true" cascade="all" /&gt;
  
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>When I see sql execution strings it is :</p>
  
  <pre><code>Hibernate: insert into coordinates (coordinates_lat, coordinates_lon) values (?, ?)
  Hibernate: insert into data_object (data_object_name, coordinates_id) values (?, ?)
  Hibernate: select weatherdat0_.data_object_id as data_obj1_1_0_, weatherdat0_.data_object_name as data_obj2_1_0_, weatherdat0_.coordinates_id as coordina3_1_0_ from data_object weatherdat0_ where weatherdat0_.data_object_id=?
  </code></pre>
  
  <p>The problem is <code>weatherdat0</code> that somehow is wrong my table is called the way I mapped it in the file data_object don't know how and why it is changed anybody can help ?</p>