Hello,
Im new to Hibernate and tried the first example from the Hibernate Reference Documentation (EVENT) ......
But always when I start my App I get the information that the table EVENT can not be found.
I changed a property in the original hibernate.cfg.xml from hbm2ddl.auto=create to hbm2ddl.auto=update, but still the App makes a new Table always when I start.
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:db_myfile</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.pool_size">1</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="current_session_context_class">thread</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">update</property>
<mapping resource="Event.hbm.xml"/>
</session-factory>
</hibernate-configuration>
<hibernate-mapping>
<class name="Event" table="EVENTS">
<id name="id" column="EVENT_ID">
<generator class="increment"/>
</id>
<property name="date" type="timestamp" column="EVENT_DATE"/>
<property name="title"/>
</class>
</hibernate-mapping>
Can anybody help what Im doing wrong ?
thanks in advance
gizmo
|