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 6907219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:24:28+00:00 2026-05-27T08:24:28+00:00

Developing a brand new schema/app which uses hibernate to create tables from pojo’s. My

  • 0

Developing a brand new schema/app which uses hibernate to create tables from pojo’s.

My desire is to now migrate existing data from legacy db to new schema, which is a matter of creating approriate sql and populating my new pojo’s.

Secondly, it is intended that this app will be used by others, migrating from different db schema’s. My initial thinkign is to therefore put the relevant sql into xml files so they can be easily changed without altering the java.

For example my current system will select loginname from logintable into pojo : User.setUsername() and then do a hibernate save. And then I can simply change the sql at a later date makign sure it returns the correct data.

Does this sound sensible ? Is their existing functionality in hibernate for doing migrations/bulk inserts ? Or will I simply be calling this n times :

User user = new User();
session.save(user);
  • 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-27T08:24:29+00:00Added an answer on May 27, 2026 at 8:24 am

    Few thoughts here.

    schema/app which uses hibernate to create tables from pojo's.

    It is not a good practice to use the hibernate to generate the table. There should be separate scripts created for that. Basically hbm2ddl.auto=create setting in hibernate is a temporary way to create the tables, but you should not be using it in a standard application. It is even unsafe to have this entry in your configuration settings.Read here for more.

    Schema migration/ data migration

    There are lots of database available that will help you to migrate bot the schema and the data and hibernate in not really meant for this. I am not aware of those but I have seen my DB Admins doing it with ease. You might achieve it using some tricks but it is better to refrain from that.

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

Sidebar

Related Questions

When developing a new web based application which version of html should you aim
I'm a newbie to WPF and I'm developing a brand new windows desktop application
I am brand new to developing for android and have hit something of a
I just copied an existing project to a brand new machine to start developing
Brand new to LemonStand, and it's my front-runner for developing a client's web site.
Developing a Sencha Touch MVC app that pulls data from json store (thats set
When developing whether its Web or Desktop at which point should a developer switch
I'm brand new at Ruby. Trying to set up the first application/project using Aptana
We're developing a new eCommerce website and are using NHibernate for the first time.
Developing a Struts 2 app I run in a following problem. I need to

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.