Announcement Announcement Module
Collapse
No announcement yet.
Tables re-created each times! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tables re-created each times!



    this is my persistence layer: persistence setup --provider HIBERNATE --database POSTGRES --userName postgres --password postgres --databaseName roo

    all works fine... but when I kill tomcat with ctrl+c and run it again, it recreates tables on db.... empty!!
    why?

  • #2
    If you are using Hibernate you can set:

    Code:
    <property name="hibernate.hbm2ddl.auto" value="update"/>
    in persistence.xml to keep your data.

    Just be aware that changes to your domain model (and therefore table model) will possibly cause some issues there. But as long as your domain model is fairly stable you should be good with the 'update' flag.

    Comment


    • #3
      Perfect. This is resolved.

      Comment

      Working...
      X