Announcement Announcement Module
Collapse
No announcement yet.
Hibernate Newbie: Current data getting deleted Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • dangerous hamster
    started a topic Hibernate Newbie: Current data getting deleted

    Hibernate Newbie: Current data getting deleted

    Hi Folks,

    Complete hibernate newbie here. I've set up a small web app using hibernate, spring etc. This is all up and running and I can't see any issues apart from one (there always is eh)

    When I first start the application (Tomcat 5.5) the current data that I have on the database table gets deleted ?? I don't want this happening but I can't find anything that tells me this is correct behavior or how to stop it ?

    Any ideas ?

  • dangerous hamster
    replied
    Yep that was it thanks very much...

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

    changed to

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

    Job done

    Leave a comment:


  • Marten Deinum
    replied
    Change your hibernate configuration. My guess is that you have enabled that the tables need to be (re)created on application startup.

    Leave a comment:

Working...
X