Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7597941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:16:59+00:00 2026-05-30T22:16:59+00:00

I learned play by following the tutorial on their website for building a little

  • 0

I learned play by following the tutorial on their website for building a little blogging engine.

It uses JPA and in it’s bootstrap calls Fixtures.Deletemodels(), (or something like that).

It basically nukes all the tables every time it runs and I lose all the data.

I’ve deployed a production system like (sans the nuke statement).

Now I need to deploy a large update to the production system. Lots of classes have changed, been added, and been removed. In my testing locally, without nuking the tables on every run I ran into sync issues. When I would try to write or read from tables play would throw errors. I opened up mysql and sure enough the tables had only been partially modified and modified incorrectly in some cases. Even if I have the DDL mode set to “create” in my config JPA can’t seem to “figure out” how to reconcile the changes and modify my schema accordingly.

So I have to put back in the bootstrap statement that nukes all my tables.

So I started looking into database evolutions within Play and read an article on the play framework website about database evolutions. The article talked about version scripts, but it said, “If you work with JPA, Hibernate can handle database evolutions for you automatically. Evolutions are useful if you don’t use JPA”.

So if JPA is supposed to be taking care of this for me, how do I deploy large updates to a large Play app? So far JPA has not been able to make the schema changes correctly and the app will throw errors. I’m not interested in losing all my data so the fix on dev “Fixtures.deleteModels()” can’t really be used in prod.

Thanks in advance,
Josh

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:17:00+00:00Added an answer on May 30, 2026 at 10:17 pm

    No, JPA should not take care of it for you. It’s not a magic tool. If you decide to rename the table “client” to “customer”, the column “street” to “line1” and to switch the values of the customer type column from 1, 2, 3 to “bronze”, “silver”, “gold”, there is no way for JPA to read in your mind and figure all the changes to do automagically.

    To migrate from one schema to another, you use the same tools as if you didn’t use JPA: SQL scripts, or more adavanced schema and data migration tools, or even custom migration JDBC code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
I learned Django following django book and the document. In the django book exmaple,
I learned Android's ArrayAdapter today, and find there is a commom pattern which uses
I learned from android dev tutorial and now I can make ListView. and it
I learned the libxml2 from http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html Trying to parsing following html using libxml2: <html><head></head>
I am building a Java web app, using the Play! Framework . I'm hosting
I learned building a web-app with Java and Seam (and JSF 1.2) But now
I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java
I learned Java in college, and then I was hired by a C# shop
I learned some time ago about Decision Trees and Decision tables. I feel that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.