Results 1 to 3 of 3

Thread: Hibernate Newbie: Current data getting deleted

  1. #1

    Default 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 ?
    Thanks
    - Garreth

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Change your hibernate configuration. My guess is that you have enabled that the tables need to be (re)created on application startup.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    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
    Thanks
    - Garreth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •