Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:.3.2
Hi, I have problem when start my hibernate application for the first time. I want create Db or Db schema if these not exist.
In the hibernate configuration file, if I use the property <property name="hibernate.hbm2ddl.auto">create</property> the application drop and re-create the schema every starup.
If I try to use the property <property name="hibernate.hbm2ddl.auto">update</property> the application don't re-create the db schema at the startup (and it's good) but if I drop the schema I have the exception: org.hibernate.util.JDBCExceptionReporter Base table or view not found message from server: "La tabella 'lemuredb.tree' non esiste"
This is the configuration file:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.connection.url">
jdbc:mysql://localhost/lemuredb
</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">
org.hibernate.dialect.MySQLInnoDBDialect
</property>
<property name="current_session_context_class">thread</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="Nodes.hbm.xml" />
<mapping resource="Tree.hbm.xml"/>
<mapping resource="Company.hbm.xml"/>
</session-factory>
</hibernate-configuration>
thanks for all