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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:34:36+00:00 2026-05-24T19:34:36+00:00

Its adds new ones, but as far as I can see it does not

  • 0

Its adds new ones, but as far as I can see it does not drop the old ones ?

When I say old ones, I mean properties of entity objects that are now completely removed,where previously they were present and annotated with @column

Are my only options to drop the col manually or change the config value to create ? Neither of which are particularly charming.

Or something else ?

  • 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-24T19:34:37+00:00Added an answer on May 24, 2026 at 7:34 pm

    For what it’s worth, never EVER use hbm2ddl.auto on any live/production database.

    Yes, it is “working as intended” that “update” doesn’t drop any columns that are not referenced (probably to allow you to use “legacy” databases that have columns that are not used by your hibernate app, but may be used by external applications). However, in certain circumstances, hibernate can drop and recreate columns if, for instance, you change the datatype in your entity. That is one of the reasons you should never use it for any production system.

    Personally, I would never trust an automated “black box” framework to handle changes to the datamodel in anything but strictly local/dev environments. I have always set it up so in the local dev environments, you may do create-drop. Once it’s time to start promoting your app to central test/stage and then prod, all database changes are done by DBA:s with good old fashioned DDL scripts. Data is far too valuable to risk on a potential bug or unexpected behavior in hibernate (or any other ORM/automated framework). I even make sure that the database user configured in my applications doesn’t even have create/drop/alter privileges in the database, just to prevent disasters happening due to bad configuration in hibernate.

    So, to answer your question – if you want hibernate to always maintain your database reflecting your entities exactly, “create-drop” is your only option. Just don’t ever use it on anything but local dev databases.

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

Sidebar

Related Questions

i build a small function its adds drop down value to div, but my
Its a simple question, but I'm not aware of the answer and I couldn't
Its broken into lines because each arrayWithObjects: adds a new question (its a quiz
I'm probably being stupid, because its Friday afternoon, but I just can't work this
An application I use, Mozy Backup , adds its own drive to Windows Explorer
Its not really a subtraction I'm looking for. And I know its not a
My magento extension adds a new block (like the poll block for example) to
I am new to MYSQL and have a problem. Its related to php too
to add new letter to textbox i use Textbox.Text = Textbox.Text + ; adds
There is a one section of orders page where users can add new fields

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.