haskovec
haskovec

Reputation: 370

JHipster: How can you change the default table names that are generated?

I notice in the entities and liquibase files that JHipster generates it prefixes all the tables with like T_USER, etc. I don't really like this style how does one change it or have it just rely on the default hibernate table names?

Upvotes: 2

Views: 2348

Answers (1)

Rori Stumpf
Rori Stumpf

Reputation: 1977

This has worked for me in the past. Change the table name in:

  1. The Java class.
  2. In the Liquibase config files - including all references such as foreign key, column changes, data load and so on.

Using this method the database will have to be recreated otherwise the Liquibase validation will fail at startup. To avoid Liquibase validation failure, try creating a new Liquibase changelog to rename the table.

Upvotes: 3

Related Questions