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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:32:28+00:00 2026-05-16T07:32:28+00:00

i’m having a light problem with liquibase and hibernate.I expect hibernate to create the

  • 0

i’m having a light problem with liquibase and hibernate.I expect hibernate to create the schema when the hbm2ddl is set to create and then have liquibase polulate the database with an sql script file.
i’ve notice that when on validate it behaves as describe and on create it doesn’t
Especially on a testing environment when using hsqldb (in memory).I seem to be blind then.

is there a way to have my expected works with hsqldb as in populate the db after it creation by hibernate. thanks for reading this.

  • 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-16T07:32:29+00:00Added an answer on May 16, 2026 at 7:32 am

    Liquibase is best used as a replacement for hbm2ddl. That way you can have your data population occur when the database is in the state that fits that data, and later changesets can upgrade your inserted data along with other changes. If you run hbm2ddl first, then liquibase to populate the data, you will need to always be making changes to your insert data structure.

    One way you can use hibernate and liquibase is to use the liquibase diff tool under ant or maven during development to append to your changelog file based on differences between your database and your hibernate model. Make sure you inspect what it is trying to do, since it isn’t always what you expect (it decides to drop and add a column instead of renaming it). Once your changelog file has been created, you can run it like any changelog file by passing it to the liquibase spring bean on app startup, for example. You don’t need to use both hbm2ddl and liquibase, as liquibase uses hbm2ddl to generate the hibernate “database” that liquibase compares your current database against.

    With this, your steps are:

    1. Make changes to your hibernate model
    2. Run liquibase diff between hibernate and your existing database
    3. Inspect your new liquibase changeSets
    4. Execute your liquibase script against the database

    The only issue may be that the hibernate diff tool may not be supported in maven like it is in ant and the command line, especially in 1.9.

    If you don’t want to deal with the liquibase diff tool, you can always append changeSets to the changelog file for each change manually. The XML format is designed to be easy to manually work with. In this case, your steps are:

    1. Make changes to your hibernate model
    2. Add required changeSet to your changelog file
    3. Execute your liquibase script against the database
    4. Test and repeat
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have been unable to fix a problem with Java Unicode and encoding. The
I have a reasonable size flat file database of text documents mostly saved in
I have a view passing on information from a database: def serve_article(request, id): served_article
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has

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.