aspose file tools*
The moose likes Spring and the fly likes Hibernate : Empty Table recreated when spring starts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
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: 49
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: 18657
    
    8

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: 17257
    
    6

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: 49
I removed this property, and all works fine now.

Many thanks !!!

Frank
 
 
subject: Hibernate : Empty Table recreated when spring starts