I'm having a problem with my mappings. The table I specify is not being used. I checked the SQL being sent to the console and it appears to be using the unqualified class name. Since both the table name and class name are the same I tried changing the table name with no effect. I also tried changing the class name and the table name in the SQL changed to the new unqualified class name. I also tried printing out the table that the class is mapped to in the Configuration object and the correct table name was returned. Why is my mapping not working?
My very simple mapping:
Code:
<class name="com.***.User" table="user" >
<id name="id" column="id" type="integer">
<generator class="identity"/>
</id>
<property name="username" type="string"/>
<property name="password" type="string"/>
</class>
SQL output from the console:
Code:
Hibernate: select user0_.id as id, user0_.user_type as user_type, user0_.username as username, user0_.password as password from USER user0_