My hibernate.cfg.xml contains the following contents:
Code:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>
<property name="hibernate.cglib.use_reflection_optimizer">true</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.default_schema"></property>
<property name="hibernate.default_catalog"></property>
<mapping resource="org/ccut/Menu.hbm.xml"/>
</session-factory>
</hibernate-configuration>
I set them to empty string. But the error still exists, like :"Table 'test._menu' doesn't exist".
If i remove them from the file, the tools would generate catalog property automatically in each .hbm.xml. The default value is the database name.
And the error still exists, like ""Table 'test.test__menu' doesn't exist".
But if I remove the catalog property from the .hbm.xml file manully, it works.
I just want to know why?