This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Spring and the fly likes Hibernate : Empty Table recreated when spring starts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Hibernate : Empty Table recreated when spring starts" Watch "Hibernate : Empty Table recreated when spring starts" New topic
Author

Hibernate : Empty Table recreated when spring starts

Frank VanOor
Ranch Hand

Joined: Jun 18, 2004
Posts: 41
Each time I'm starting Tomcat/Spring, hibernate recreates the mapped table (only one table is mapped).
Below the applicationcontext and the Entity Class.

Many thanks in advance.




Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Isn't that a Hibernate FAQ? Anyway it does that because you tell it to do so in line 42 of what you posted.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17228
    
    1

This 42

<prop key="hibernate.hbm2ddl.auto">create</prop>

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Frank VanOor
Ranch Hand

Joined: Jun 18, 2004
Posts: 41
I removed this property, and all works fine now.

Many thanks !!!

Frank
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Hibernate : Empty Table recreated when spring starts
 
Similar Threads
HibernateException: No Hibernate Session bound to thread
data not persisted using hibernate spring integration
org.hibernate.MappingException: Unknown entity:
org.hibernate.MappingException: Unknown entity
Spring 2.5 - Rolling back first method, when the second method throws Runtime ex