-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: table is always lost
PostPosted: Fri Feb 24, 2006 12:38 pm 
Newbie

Joined: Fri Feb 24, 2006 12:16 pm
Posts: 4
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


Top
 Profile  
 
 Post subject: table is always lost
PostPosted: Fri Feb 24, 2006 4:37 pm 
Newbie

Joined: Fri Feb 24, 2006 12:16 pm
Posts: 4
Found the solution :
I have to add
<property name="hibernate.connection.shutdown">true</property>
to the hibernate.cfg.xml.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.