Announcement Announcement Module
Collapse
No announcement yet.
changing roo after the fact clears my db. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • changing roo after the fact clears my db.

    Hi there,

    I've created a simple roo app that points to a mysql db. I created a couple entities, and added a web controller for it. I was able to talk to the db, and see (in my mysql command line) that data was correctly getting into the db.

    However, I then added a field to one of my entities and it appears that the application dropped and recreated all of the tables & fields since none of the data i previously created was there.

    is there a way to avoid th is?

    thx
    Ben

  • #2
    Hi Ben,

    When changing your domain model (adding fields, etc) it is best to recreate the table model on application restart. Your data will be lost, but at that stage (with a domain model in progress) it would probably not matter that much. Once it is more stable you can change the hbmddl property in persistence.xml from create to update. See this forum post for details.

    HTH

    Comment

    Working...
    X